0000: 23 0a 23 20 49 6e 63 6c 75 64 65 20 74 68 65 20 #.# Include the
0010: 54 45 41 20 73 74 61 6e 64 61 72 64 20 6d 61 63 TEA standard mac
0020: 72 6f 20 73 65 74 0a 23 0a 0a 62 75 69 6c 74 69 ro set.#..builti
0030: 6e 28 69 6e 63 6c 75 64 65 2c 74 63 6c 63 6f 6e n(include,tclcon
0040: 66 69 67 2f 74 63 6c 2e 6d 34 29 0a 0a 23 0a 23 fig/tcl.m4)..#.#
0050: 20 41 64 64 20 68 65 72 65 20 77 68 61 74 65 76 Add here whatev
0060: 65 72 20 6d 34 20 6d 61 63 72 6f 73 20 79 6f 75 er m4 macros you
0070: 20 77 61 6e 74 20 74 6f 20 64 65 66 69 6e 65 20 want to define
0080: 66 6f 72 20 79 6f 75 72 20 70 61 63 6b 61 67 65 for your package
0090: 0a 23 0a 0a 41 43 5f 44 45 46 55 4e 28 5b 54 43 .#..AC_DEFUN([TC
00a0: 4c 54 4c 53 5f 53 53 4c 5f 4f 50 45 4e 53 53 4c LTLS_SSL_OPENSSL
00b0: 5d 2c 20 5b 0a 09 41 43 5f 43 48 45 43 4b 5f 54 ], [..AC_CHECK_T
00c0: 4f 4f 4c 28 5b 50 4b 47 5f 43 4f 4e 46 49 47 5d OOL([PKG_CONFIG]
00d0: 2c 20 5b 70 6b 67 2d 63 6f 6e 66 69 67 5d 29 0a , [pkg-config]).
00e0: 0a 09 64 6e 6c 20 44 69 73 61 62 6c 65 20 73 75 ..dnl Disable su
00f0: 70 70 6f 72 74 20 66 6f 72 20 54 4c 53 20 31 2e pport for TLS 1.
0100: 30 20 70 72 6f 74 6f 63 6f 6c 0a 09 41 43 5f 41 0 protocol..AC_A
0110: 52 47 5f 45 4e 41 42 4c 45 28 5b 74 6c 73 31 5d RG_ENABLE([tls1]
0120: 2c 20 41 53 5f 48 45 4c 50 5f 53 54 52 49 4e 47 , AS_HELP_STRING
0130: 28 5b 2d 2d 64 69 73 61 62 6c 65 2d 74 6c 73 31 ([--disable-tls1
0140: 5d 2c 20 5b 64 69 73 61 62 6c 65 20 54 4c 53 31 ], [disable TLS1
0150: 20 70 72 6f 74 6f 63 6f 6c 5d 29 2c 20 5b 0a 09 protocol]), [..
0160: 09 69 66 20 74 65 73 74 20 22 24 7b 65 6e 61 62 .if test "${enab
0170: 6c 65 76 61 6c 7d 22 20 3d 20 22 6e 6f 22 3b 20 leval}" = "no";
0180: 74 68 65 6e 0a 09 09 09 41 43 5f 44 45 46 49 4e then....AC_DEFIN
0190: 45 28 5b 4e 4f 5f 54 4c 53 31 5d 2c 20 5b 31 5d E([NO_TLS1], [1]
01a0: 2c 20 5b 44 69 73 61 62 6c 65 20 54 4c 53 31 20 , [Disable TLS1
01b0: 70 72 6f 74 6f 63 6f 6c 5d 29 0a 09 09 09 41 43 protocol])....AC
01c0: 5f 4d 53 47 5f 43 48 45 43 4b 49 4e 47 28 5b 66 _MSG_CHECKING([f
01d0: 6f 72 20 64 69 73 61 62 6c 65 20 54 4c 53 31 20 or disable TLS1
01e0: 70 72 6f 74 6f 63 6f 6c 5d 29 0a 09 09 09 41 43 protocol])....AC
01f0: 5f 4d 53 47 5f 52 45 53 55 4c 54 28 27 79 65 73 _MSG_RESULT('yes
0200: 27 29 0a 09 09 66 69 0a 09 5d 29 0a 0a 09 64 6e ')...fi..])...dn
0210: 6c 20 44 69 73 61 62 6c 65 20 73 75 70 70 6f 72 l Disable suppor
0220: 74 20 66 6f 72 20 54 4c 53 20 31 2e 31 20 70 72 t for TLS 1.1 pr
0230: 6f 74 6f 63 6f 6c 0a 09 41 43 5f 41 52 47 5f 45 otocol..AC_ARG_E
0240: 4e 41 42 4c 45 28 5b 74 6c 73 31 5f 31 5d 2c 20 NABLE([tls1_1],
0250: 41 53 5f 48 45 4c 50 5f 53 54 52 49 4e 47 28 5b AS_HELP_STRING([
0260: 2d 2d 64 69 73 61 62 6c 65 2d 74 6c 73 31 5f 31 --disable-tls1_1
0270: 5d 2c 20 5b 64 69 73 61 62 6c 65 20 54 4c 53 31 ], [disable TLS1
0280: 2e 31 20 70 72 6f 74 6f 63 6f 6c 5d 29 2c 20 5b .1 protocol]), [
0290: 0a 09 09 69 66 20 74 65 73 74 20 22 24 7b 65 6e ...if test "${en
02a0: 61 62 6c 65 76 61 6c 7d 22 20 3d 20 22 6e 6f 22 ableval}" = "no"
02b0: 3b 20 74 68 65 6e 0a 09 09 09 41 43 5f 44 45 46 ; then....AC_DEF
02c0: 49 4e 45 28 5b 4e 4f 5f 54 4c 53 31 5f 31 5d 2c INE([NO_TLS1_1],
02d0: 20 5b 31 5d 2c 20 5b 44 69 73 61 62 6c 65 20 54 [1], [Disable T
02e0: 4c 53 31 2e 31 20 70 72 6f 74 6f 63 6f 6c 5d 29 LS1.1 protocol])
02f0: 0a 09 09 09 41 43 5f 4d 53 47 5f 43 48 45 43 4b ....AC_MSG_CHECK
0300: 49 4e 47 28 5b 66 6f 72 20 64 69 73 61 62 6c 65 ING([for disable
0310: 20 54 4c 53 31 2e 31 20 70 72 6f 74 6f 63 6f 6c TLS1.1 protocol
0320: 5d 29 0a 09 09 09 41 43 5f 4d 53 47 5f 52 45 53 ])....AC_MSG_RES
0330: 55 4c 54 28 27 79 65 73 27 29 0a 09 09 66 69 0a ULT('yes')...fi.
0340: 09 5d 29 0a 0a 09 64 6e 6c 20 44 69 73 61 62 6c .])...dnl Disabl
0350: 65 20 73 75 70 70 6f 72 74 20 66 6f 72 20 54 4c e support for TL
0360: 53 20 31 2e 32 20 70 72 6f 74 6f 63 6f 6c 0a 09 S 1.2 protocol..
0370: 41 43 5f 41 52 47 5f 45 4e 41 42 4c 45 28 5b 74 AC_ARG_ENABLE([t
0380: 6c 73 31 5f 32 5d 2c 20 41 53 5f 48 45 4c 50 5f ls1_2], AS_HELP_
0390: 53 54 52 49 4e 47 28 5b 2d 2d 64 69 73 61 62 6c STRING([--disabl
03a0: 65 2d 74 6c 73 31 5f 32 5d 2c 20 5b 64 69 73 61 e-tls1_2], [disa
03b0: 62 6c 65 20 54 4c 53 31 2e 32 20 70 72 6f 74 6f ble TLS1.2 proto
03c0: 63 6f 6c 5d 29 2c 20 5b 0a 09 09 69 66 20 74 65 col]), [...if te
03d0: 73 74 20 22 24 7b 65 6e 61 62 6c 65 76 61 6c 7d st "${enableval}
03e0: 22 20 3d 20 22 6e 6f 22 3b 20 74 68 65 6e 0a 09 " = "no"; then..
03f0: 09 09 41 43 5f 44 45 46 49 4e 45 28 5b 4e 4f 5f ..AC_DEFINE([NO_
0400: 54 4c 53 31 5f 32 5d 2c 20 5b 31 5d 2c 20 5b 44 TLS1_2], [1], [D
0410: 69 73 61 62 6c 65 20 54 4c 53 31 2e 32 20 70 72 isable TLS1.2 pr
0420: 6f 74 6f 63 6f 6c 5d 29 0a 09 09 09 41 43 5f 4d otocol])....AC_M
0430: 53 47 5f 43 48 45 43 4b 49 4e 47 28 5b 66 6f 72 SG_CHECKING([for
0440: 20 64 69 73 61 62 6c 65 20 54 4c 53 31 2e 32 20 disable TLS1.2
0450: 70 72 6f 74 6f 63 6f 6c 5d 29 0a 09 09 09 41 43 protocol])....AC
0460: 5f 4d 53 47 5f 52 45 53 55 4c 54 28 27 79 65 73 _MSG_RESULT('yes
0470: 27 29 0a 09 09 66 69 0a 09 5d 29 0a 0a 09 64 6e ')...fi..])...dn
0480: 6c 20 44 69 73 61 62 6c 65 20 73 75 70 70 6f 72 l Disable suppor
0490: 74 20 66 6f 72 20 54 4c 53 20 31 2e 33 20 70 72 t for TLS 1.3 pr
04a0: 6f 74 6f 63 6f 6c 0a 09 41 43 5f 41 52 47 5f 45 otocol..AC_ARG_E
04b0: 4e 41 42 4c 45 28 5b 74 6c 73 31 5f 33 5d 2c 20 NABLE([tls1_3],
04c0: 41 53 5f 48 45 4c 50 5f 53 54 52 49 4e 47 28 5b AS_HELP_STRING([
04d0: 2d 2d 64 69 73 61 62 6c 65 2d 74 6c 73 31 5f 33 --disable-tls1_3
04e0: 5d 2c 20 5b 64 69 73 61 62 6c 65 20 54 4c 53 31 ], [disable TLS1
04f0: 2e 33 20 70 72 6f 74 6f 63 6f 6c 5d 29 2c 20 5b .3 protocol]), [
0500: 0a 09 09 69 66 20 74 65 73 74 20 22 24 7b 65 6e ...if test "${en
0510: 61 62 6c 65 76 61 6c 7d 22 20 3d 20 22 6e 6f 22 ableval}" = "no"
0520: 3b 20 74 68 65 6e 0a 09 09 09 41 43 5f 44 45 46 ; then....AC_DEF
0530: 49 4e 45 28 5b 4e 4f 5f 54 4c 53 31 5f 33 5d 2c INE([NO_TLS1_3],
0540: 20 5b 31 5d 2c 20 5b 44 69 73 61 62 6c 65 20 54 [1], [Disable T
0550: 4c 53 31 2e 33 20 70 72 6f 74 6f 63 6f 6c 5d 29 LS1.3 protocol])
0560: 0a 09 09 09 41 43 5f 4d 53 47 5f 43 48 45 43 4b ....AC_MSG_CHECK
0570: 49 4e 47 28 5b 66 6f 72 20 64 69 73 61 62 6c 65 ING([for disable
0580: 20 54 4c 53 31 2e 33 20 70 72 6f 74 6f 63 6f 6c TLS1.3 protocol
0590: 5d 29 0a 09 09 09 41 43 5f 4d 53 47 5f 52 45 53 ])....AC_MSG_RES
05a0: 55 4c 54 28 27 79 65 73 27 29 0a 09 09 66 69 0a ULT('yes')...fi.
05b0: 09 5d 29 0a 0a 0a 09 64 6e 6c 20 44 65 74 65 72 .])....dnl Deter
05c0: 6d 69 6e 65 20 69 66 20 77 65 20 68 61 76 65 20 mine if we have
05d0: 62 65 65 6e 20 61 73 6b 65 64 20 74 6f 20 75 73 been asked to us
05e0: 65 20 61 20 66 61 73 74 20 70 61 74 68 20 69 66 e a fast path if
05f0: 20 70 6f 73 73 69 62 6c 65 0a 09 41 43 5f 41 52 possible..AC_AR
0600: 47 5f 45 4e 41 42 4c 45 28 5b 73 73 6c 2d 66 61 G_ENABLE([ssl-fa
0610: 73 74 70 61 74 68 5d 2c 20 41 53 5f 48 45 4c 50 stpath], AS_HELP
0620: 5f 53 54 52 49 4e 47 28 5b 2d 2d 65 6e 61 62 6c _STRING([--enabl
0630: 65 2d 73 73 6c 2d 66 61 73 74 70 61 74 68 5d 2c e-ssl-fastpath],
0640: 0a 09 09 5b 65 6e 61 62 6c 65 20 75 73 69 6e 67 ...[enable using
0650: 20 74 68 65 20 75 6e 64 65 72 6c 79 69 6e 67 20 the underlying
0660: 66 69 6c 65 20 64 65 73 63 72 69 70 74 6f 72 20 file descriptor
0670: 66 6f 72 20 74 61 6c 6b 69 6e 67 20 64 69 72 65 for talking dire
0680: 63 74 6c 79 20 74 6f 20 74 68 65 20 53 53 4c 20 ctly to the SSL
0690: 6c 69 62 72 61 72 79 5d 29 2c 20 5b 0a 09 09 74 library]), [...t
06a0: 63 6c 74 6c 73 5f 73 73 6c 5f 66 61 73 74 70 61 cltls_ssl_fastpa
06b0: 74 68 3d 22 24 65 6e 61 62 6c 65 76 61 6c 22 0a th="$enableval".
06c0: 09 5d 2c 20 5b 0a 09 09 74 63 6c 74 6c 73 5f 73 .], [...tcltls_s
06d0: 73 6c 5f 66 61 73 74 70 61 74 68 3d 27 6e 6f 27 sl_fastpath='no'
06e0: 0a 09 5d 29 0a 09 69 66 20 74 65 73 74 20 22 24 ..])..if test "$
06f0: 74 63 6c 74 6c 73 5f 73 73 6c 5f 66 61 73 74 70 tcltls_ssl_fastp
0700: 61 74 68 22 20 3d 20 27 79 65 73 27 3b 20 74 68 ath" = 'yes'; th
0710: 65 6e 0a 09 09 41 43 5f 44 45 46 49 4e 45 28 54 en...AC_DEFINE(T
0720: 43 4c 54 4c 53 5f 53 53 4c 5f 55 53 45 5f 46 41 CLTLS_SSL_USE_FA
0730: 53 54 50 41 54 48 2c 20 5b 31 5d 2c 20 5b 45 6e STPATH, [1], [En
0740: 61 62 6c 65 20 53 53 4c 20 6c 69 62 72 61 72 79 able SSL library
0750: 20 64 69 72 65 63 74 20 75 73 65 20 6f 66 20 74 direct use of t
0760: 68 65 20 75 6e 64 65 72 6c 79 69 6e 67 20 66 69 he underlying fi
0770: 6c 65 20 64 65 73 63 72 69 70 74 6f 72 5d 29 0a le descriptor]).
0780: 09 66 69 0a 09 41 43 5f 4d 53 47 5f 43 48 45 43 .fi..AC_MSG_CHEC
0790: 4b 49 4e 47 28 5b 66 6f 72 20 66 61 73 74 20 70 KING([for fast p
07a0: 61 74 68 5d 29 0a 09 41 43 5f 4d 53 47 5f 52 45 ath])..AC_MSG_RE
07b0: 53 55 4c 54 28 5b 24 74 63 6c 74 6c 73 5f 73 73 SULT([$tcltls_ss
07c0: 6c 5f 66 61 73 74 70 61 74 68 5d 29 0a 0a 0a 09 l_fastpath])....
07d0: 64 6e 6c 20 45 6e 61 62 6c 65 20 68 61 72 64 65 dnl Enable harde
07e0: 6e 69 6e 67 0a 09 41 43 5f 41 52 47 5f 45 4e 41 ning..AC_ARG_ENA
07f0: 42 4c 45 28 5b 68 61 72 64 65 6e 69 6e 67 5d 2c BLE([hardening],
0800: 20 41 53 5f 48 45 4c 50 5f 53 54 52 49 4e 47 28 AS_HELP_STRING(
0810: 5b 2d 2d 65 6e 61 62 6c 65 2d 68 61 72 64 65 6e [--enable-harden
0820: 69 6e 67 5d 2c 20 5b 65 6e 61 62 6c 65 20 68 61 ing], [enable ha
0830: 72 64 65 6e 69 6e 67 20 61 74 74 65 6d 70 74 73 rdening attempts
0840: 5d 29 2c 20 5b 0a 09 09 74 63 6c 74 6c 73 5f 65 ]), [...tcltls_e
0850: 6e 61 62 6c 65 5f 68 61 72 64 65 6e 69 6e 67 3d nable_hardening=
0860: 22 24 65 6e 61 62 6c 65 76 61 6c 22 0a 09 5d 2c "$enableval"..],
0870: 20 5b 0a 09 09 74 63 6c 74 6c 73 5f 65 6e 61 62 [...tcltls_enab
0880: 6c 65 5f 68 61 72 64 65 6e 69 6e 67 3d 27 79 65 le_hardening='ye
0890: 73 27 0a 09 5d 29 0a 09 69 66 20 74 65 73 74 20 s'..])..if test
08a0: 22 24 74 63 6c 74 6c 73 5f 65 6e 61 62 6c 65 5f "$tcltls_enable_
08b0: 68 61 72 64 65 6e 69 6e 67 22 20 3d 20 27 79 65 hardening" = 'ye
08c0: 73 27 3b 20 74 68 65 6e 0a 09 09 69 66 20 74 65 s'; then...if te
08d0: 73 74 20 22 24 47 43 43 22 20 3d 20 27 79 65 73 st "$GCC" = 'yes
08e0: 27 20 2d 6f 20 22 24 43 43 22 20 3d 20 27 63 6c ' -o "$CC" = 'cl
08f0: 61 6e 67 27 3b 20 74 68 65 6e 0a 09 09 09 54 45 ang'; then....TE
0900: 41 5f 41 44 44 5f 43 46 4c 41 47 53 28 5b 2d 66 A_ADD_CFLAGS([-f
0910: 73 74 61 63 6b 2d 70 72 6f 74 65 63 74 6f 72 2d stack-protector-
0920: 61 6c 6c 5d 29 0a 09 09 09 54 45 41 5f 41 44 44 all])....TEA_ADD
0930: 5f 43 46 4c 41 47 53 28 5b 2d 66 6e 6f 2d 73 74 _CFLAGS([-fno-st
0940: 72 69 63 74 2d 6f 76 65 72 66 6c 6f 77 5d 29 0a rict-overflow]).
0950: 09 09 09 41 43 5f 44 45 46 49 4e 45 28 5b 5f 46 ...AC_DEFINE([_F
0960: 4f 52 54 49 46 59 5f 53 4f 55 52 43 45 5d 2c 20 ORTIFY_SOURCE],
0970: 5b 32 5d 2c 20 5b 45 6e 61 62 6c 65 20 66 6f 72 [2], [Enable for
0980: 74 69 66 69 63 61 74 69 6f 6e 5d 29 0a 09 09 66 tification])...f
0990: 69 0a 09 66 69 0a 09 41 43 5f 4d 53 47 5f 43 48 i..fi..AC_MSG_CH
09a0: 45 43 4b 49 4e 47 28 5b 66 6f 72 20 65 6e 61 62 ECKING([for enab
09b0: 6c 65 20 68 61 72 64 65 6e 69 6e 67 5d 29 0a 09 le hardening])..
09c0: 41 43 5f 4d 53 47 5f 52 45 53 55 4c 54 28 5b 24 AC_MSG_RESULT([$
09d0: 74 63 6c 74 6c 73 5f 65 6e 61 62 6c 65 5f 68 61 tcltls_enable_ha
09e0: 72 64 65 6e 69 6e 67 5d 29 0a 0a 0a 09 64 6e 6c rdening])....dnl
09f0: 20 44 65 74 65 72 6d 69 6e 65 20 69 66 20 77 65 Determine if we
0a00: 20 68 61 76 65 20 62 65 65 6e 20 61 73 6b 65 64 have been asked
0a10: 20 74 6f 20 73 74 61 74 69 63 61 6c 6c 79 20 6c to statically l
0a20: 69 6e 6b 20 74 6f 20 74 68 65 20 53 53 4c 20 6c ink to the SSL l
0a30: 69 62 72 61 72 79 0a 09 41 43 5f 41 52 47 5f 45 ibrary..AC_ARG_E
0a40: 4e 41 42 4c 45 28 5b 73 74 61 74 69 63 2d 73 73 NABLE([static-ss
0a50: 6c 5d 2c 20 41 53 5f 48 45 4c 50 5f 53 54 52 49 l], AS_HELP_STRI
0a60: 4e 47 28 5b 2d 2d 65 6e 61 62 6c 65 2d 73 74 61 NG([--enable-sta
0a70: 74 69 63 2d 73 73 6c 5d 2c 20 5b 65 6e 61 62 6c tic-ssl], [enabl
0a80: 65 20 73 74 61 74 69 63 20 6c 69 6e 6b 69 6e 67 e static linking
0a90: 20 74 6f 20 74 68 65 20 53 53 4c 20 6c 69 62 72 to the SSL libr
0aa0: 61 72 79 5d 29 2c 20 5b 0a 09 09 54 43 4c 45 58 ary]), [...TCLEX
0ab0: 54 5f 54 4c 53 5f 53 54 41 54 49 43 5f 53 53 4c T_TLS_STATIC_SSL
0ac0: 3d 22 24 65 6e 61 62 6c 65 76 61 6c 22 0a 09 5d ="$enableval"..]
0ad0: 2c 20 5b 0a 09 09 54 43 4c 45 58 54 5f 54 4c 53 , [...TCLEXT_TLS
0ae0: 5f 53 54 41 54 49 43 5f 53 53 4c 3d 27 6e 6f 27 _STATIC_SSL='no'
0af0: 0a 09 5d 29 0a 09 41 43 5f 4d 53 47 5f 43 48 45 ..])..AC_MSG_CHE
0b00: 43 4b 49 4e 47 28 5b 66 6f 72 20 73 74 61 74 69 CKING([for stati
0b10: 63 20 6c 69 6e 6b 69 6e 67 20 6f 66 20 6f 70 65 c linking of ope
0b20: 6e 53 53 4c 20 6c 69 62 72 61 72 69 65 73 5d 29 nSSL libraries])
0b30: 0a 09 41 43 5f 4d 53 47 5f 52 45 53 55 4c 54 28 ..AC_MSG_RESULT(
0b40: 5b 24 54 43 4c 45 58 54 5f 54 4c 53 5f 53 54 41 [$TCLEXT_TLS_STA
0b50: 54 49 43 5f 53 53 4c 5d 29 0a 0a 0a 09 64 6e 6c TIC_SSL])....dnl
0b60: 20 53 65 74 20 53 53 4c 20 66 69 6c 65 73 20 72 Set SSL files r
0b70: 6f 6f 74 20 70 61 74 68 0a 09 41 43 5f 41 52 47 oot path..AC_ARG
0b80: 5f 57 49 54 48 28 5b 6f 70 65 6e 73 73 6c 2d 64 _WITH([openssl-d
0b90: 69 72 5d 2c 0a 09 09 41 53 5f 48 45 4c 50 5f 53 ir],...AS_HELP_S
0ba0: 54 52 49 4e 47 28 5b 2d 2d 77 69 74 68 2d 6f 70 TRING([--with-op
0bb0: 65 6e 73 73 6c 2d 64 69 72 3d 3c 64 69 72 3e 5d enssl-dir=<dir>]
0bc0: 2c 0a 09 09 09 5b 70 61 74 68 20 74 6f 20 72 6f ,....[path to ro
0bd0: 6f 74 20 64 69 72 65 63 74 6f 72 79 20 6f 66 20 ot directory of
0be0: 4f 70 65 6e 53 53 4c 20 6f 72 20 4c 69 62 72 65 OpenSSL or Libre
0bf0: 53 53 4c 20 69 6e 73 74 61 6c 6c 61 74 69 6f 6e SSL installation
0c00: 5d 0a 09 09 29 2c 20 5b 0a 09 09 09 6f 70 65 6e ]...), [....open
0c10: 73 73 6c 64 69 72 3d 22 24 77 69 74 68 76 61 6c ssldir="$withval
0c20: 22 0a 09 09 5d 2c 20 5b 0a 09 09 09 6f 70 65 6e "...], [....open
0c30: 73 73 6c 64 69 72 3d 27 27 0a 09 09 5d 0a 09 29 ssldir=''...]..)
0c40: 0a 0a 09 64 6e 6c 20 53 65 74 20 53 53 4c 20 69 ...dnl Set SSL i
0c50: 6e 63 6c 75 64 65 20 66 69 6c 65 73 20 70 61 74 nclude files pat
0c60: 68 0a 09 41 43 5f 41 52 47 5f 57 49 54 48 28 5b h..AC_ARG_WITH([
0c70: 6f 70 65 6e 73 73 6c 2d 69 6e 63 6c 75 64 65 64 openssl-included
0c80: 69 72 5d 2c 0a 09 09 41 53 5f 48 45 4c 50 5f 53 ir],...AS_HELP_S
0c90: 54 52 49 4e 47 28 5b 2d 2d 77 69 74 68 2d 6f 70 TRING([--with-op
0ca0: 65 6e 73 73 6c 2d 69 6e 63 6c 75 64 65 64 69 72 enssl-includedir
0cb0: 3d 3c 64 69 72 3e 5d 2c 0a 09 09 09 5b 70 61 74 =<dir>],....[pat
0cc0: 68 20 74 6f 20 69 6e 63 6c 75 64 65 20 64 69 72 h to include dir
0cd0: 65 63 74 6f 72 79 20 6f 66 20 4f 70 65 6e 53 53 ectory of OpenSS
0ce0: 4c 20 6f 72 20 4c 69 62 72 65 53 53 4c 20 69 6e L or LibreSSL in
0cf0: 73 74 61 6c 6c 61 74 69 6f 6e 5d 0a 09 09 29 2c stallation]...),
0d00: 20 5b 0a 09 09 09 6f 70 65 6e 73 73 6c 69 6e 63 [....opensslinc
0d10: 6c 75 64 65 64 69 72 3d 22 24 77 69 74 68 76 61 ludedir="$withva
0d20: 6c 22 0a 09 09 5d 2c 20 5b 0a 09 09 09 69 66 20 l"...], [....if
0d30: 74 65 73 74 20 2d 6e 20 22 24 6f 70 65 6e 73 73 test -n "$openss
0d40: 6c 64 69 72 22 3b 20 74 68 65 6e 0a 09 09 09 09 ldir"; then.....
0d50: 6f 70 65 6e 73 73 6c 69 6e 63 6c 75 64 65 64 69 opensslincludedi
0d60: 72 3d 22 24 6f 70 65 6e 73 73 6c 64 69 72 2f 69 r="$openssldir/i
0d70: 6e 63 6c 75 64 65 2f 6f 70 65 6e 73 73 6c 22 0a nclude/openssl".
0d80: 09 09 09 65 6c 73 65 0a 09 09 09 09 6f 70 65 6e ...else.....open
0d90: 73 73 6c 69 6e 63 6c 75 64 65 64 69 72 3d 27 27 sslincludedir=''
0da0: 0a 09 09 09 66 69 0a 09 09 5d 0a 09 29 0a 09 41 ....fi...]..)..A
0db0: 43 5f 4d 53 47 5f 43 48 45 43 4b 49 4e 47 28 5b C_MSG_CHECKING([
0dc0: 66 6f 72 20 4f 70 65 6e 53 53 4c 20 69 6e 63 6c for OpenSSL incl
0dd0: 75 64 65 20 64 69 72 65 63 74 6f 72 79 5d 29 0a ude directory]).
0de0: 09 41 43 5f 4d 53 47 5f 52 45 53 55 4c 54 28 24 .AC_MSG_RESULT($
0df0: 6f 70 65 6e 73 73 6c 69 6e 63 6c 75 64 65 64 69 opensslincludedi
0e00: 72 29 0a 0a 09 64 6e 6c 20 53 65 74 20 53 53 4c r)...dnl Set SSL
0e10: 20 69 6e 63 6c 75 64 65 20 76 61 72 73 0a 09 69 include vars..i
0e20: 66 20 74 65 73 74 20 2d 6e 20 22 24 6f 70 65 6e f test -n "$open
0e30: 73 73 6c 69 6e 63 6c 75 64 65 64 69 72 22 3b 20 sslincludedir";
0e40: 74 68 65 6e 0a 09 09 69 66 20 74 65 73 74 20 2d then...if test -
0e50: 66 20 22 24 6f 70 65 6e 73 73 6c 69 6e 63 6c 75 f "$opensslinclu
0e60: 64 65 64 69 72 2f 73 73 6c 2e 68 22 3b 20 74 68 dedir/ssl.h"; th
0e70: 65 6e 0a 09 09 09 54 43 4c 54 4c 53 5f 53 53 4c en....TCLTLS_SSL
0e80: 5f 43 46 4c 41 47 53 3d 22 2d 49 24 6f 70 65 6e _CFLAGS="-I$open
0e90: 73 73 6c 69 6e 63 6c 75 64 65 64 69 72 22 0a 09 sslincludedir"..
0ea0: 09 09 54 43 4c 54 4c 53 5f 53 53 4c 5f 49 4e 43 ..TCLTLS_SSL_INC
0eb0: 4c 55 44 45 53 3d 22 2d 49 24 6f 70 65 6e 73 73 LUDES="-I$openss
0ec0: 6c 69 6e 63 6c 75 64 65 64 69 72 22 0a 09 09 65 lincludedir"...e
0ed0: 6c 73 65 0a 09 09 09 41 43 5f 4d 53 47 5f 45 52 lse....AC_MSG_ER
0ee0: 52 4f 52 28 5b 55 6e 61 62 6c 65 20 74 6f 20 6c ROR([Unable to l
0ef0: 6f 63 61 74 65 20 73 73 6c 2e 68 5d 29 0a 09 09 ocate ssl.h])...
0f00: 66 69 0a 09 65 6c 73 65 0a 09 09 54 43 4c 54 4c fi..else...TCLTL
0f10: 53 5f 53 53 4c 5f 43 46 4c 41 47 53 3d 22 2d 49 S_SSL_CFLAGS="-I
0f20: 24 28 69 6e 63 6c 75 64 65 64 69 72 29 2f 6f 70 $(includedir)/op
0f30: 65 6e 73 73 6c 22 0a 09 09 54 43 4c 54 4c 53 5f enssl"...TCLTLS_
0f40: 53 53 4c 5f 49 4e 43 4c 55 44 45 53 3d 22 2d 49 SSL_INCLUDES="-I
0f50: 24 28 69 6e 63 6c 75 64 65 64 69 72 29 2f 6f 70 $(includedir)/op
0f60: 65 6e 73 73 6c 22 0a 09 66 69 0a 0a 09 64 6e 6c enssl"..fi...dnl
0f70: 20 53 65 74 20 53 53 4c 20 6c 69 62 20 66 69 6c Set SSL lib fil
0f80: 65 73 20 70 61 74 68 0a 09 41 43 5f 41 52 47 5f es path..AC_ARG_
0f90: 57 49 54 48 28 5b 6f 70 65 6e 73 73 6c 2d 6c 69 WITH([openssl-li
0fa0: 62 64 69 72 5d 2c 0a 09 09 41 53 5f 48 45 4c 50 bdir],...AS_HELP
0fb0: 5f 53 54 52 49 4e 47 28 5b 2d 2d 77 69 74 68 2d _STRING([--with-
0fc0: 6f 70 65 6e 73 73 6c 2d 6c 69 62 64 69 72 3d 3c openssl-libdir=<
0fd0: 64 69 72 3e 5d 2c 0a 09 09 09 5b 70 61 74 68 20 dir>],....[path
0fe0: 74 6f 20 6c 69 62 20 64 69 72 65 63 74 6f 72 79 to lib directory
0ff0: 20 6f 66 20 4f 70 65 6e 53 53 4c 20 6f 72 20 4c of OpenSSL or L
1000: 69 62 72 65 53 53 4c 20 69 6e 73 74 61 6c 6c 61 ibreSSL installa
1010: 74 69 6f 6e 5d 0a 09 09 29 2c 20 5b 0a 09 09 09 tion]...), [....
1020: 6f 70 65 6e 73 73 6c 6c 69 62 64 69 72 3d 22 24 openssllibdir="$
1030: 77 69 74 68 76 61 6c 22 0a 09 09 5d 2c 20 5b 0a withval"...], [.
1040: 09 09 09 69 66 20 74 65 73 74 20 2d 6e 20 22 24 ...if test -n "$
1050: 6f 70 65 6e 73 73 6c 64 69 72 22 3b 20 74 68 65 openssldir"; the
1060: 6e 0a 09 09 09 09 69 66 20 74 65 73 74 20 22 24 n.....if test "$
1070: 64 6f 36 34 62 69 74 22 20 3d 3d 20 27 79 65 73 do64bit" == 'yes
1080: 27 3b 20 74 68 65 6e 0a 09 09 09 09 09 6f 70 65 '; then......ope
1090: 6e 73 73 6c 6c 69 62 64 69 72 3d 22 24 6f 70 65 nssllibdir="$ope
10a0: 6e 73 73 6c 64 69 72 2f 6c 69 62 36 34 22 0a 09 nssldir/lib64"..
10b0: 09 09 09 65 6c 73 65 0a 09 09 09 09 09 6f 70 65 ...else......ope
10c0: 6e 73 73 6c 6c 69 62 64 69 72 3d 22 24 6f 70 65 nssllibdir="$ope
10d0: 6e 73 73 6c 64 69 72 2f 6c 69 62 22 0a 09 09 09 nssldir/lib"....
10e0: 09 66 69 0a 09 09 09 65 6c 73 65 0a 09 09 09 09 .fi....else.....
10f0: 6f 70 65 6e 73 73 6c 6c 69 62 64 69 72 3d 27 27 openssllibdir=''
1100: 0a 09 09 09 66 69 0a 09 09 5d 0a 09 29 0a 09 41 ....fi...]..)..A
1110: 43 5f 4d 53 47 5f 43 48 45 43 4b 49 4e 47 28 5b C_MSG_CHECKING([
1120: 66 6f 72 20 4f 70 65 6e 53 53 4c 20 6c 69 62 20 for OpenSSL lib
1130: 64 69 72 65 63 74 6f 72 79 5d 29 0a 09 41 43 5f directory])..AC_
1140: 4d 53 47 5f 52 45 53 55 4c 54 28 24 6f 70 65 6e MSG_RESULT($open
1150: 73 73 6c 6c 69 62 64 69 72 29 0a 0a 09 64 6e 6c ssllibdir)...dnl
1160: 20 53 65 74 20 53 53 4c 20 6c 69 62 20 76 61 72 Set SSL lib var
1170: 73 0a 09 69 66 20 74 65 73 74 20 2d 6e 20 22 24 s..if test -n "$
1180: 6f 70 65 6e 73 73 6c 6c 69 62 64 69 72 22 3b 20 openssllibdir";
1190: 74 68 65 6e 0a 09 09 69 66 20 74 65 73 74 20 2d then...if test -
11a0: 66 20 22 24 6f 70 65 6e 73 73 6c 6c 69 62 64 69 f "$openssllibdi
11b0: 72 2f 6c 69 62 73 73 6c 24 7b 53 48 4c 49 42 5f r/libssl${SHLIB_
11c0: 53 55 46 46 49 58 7d 22 3b 20 74 68 65 6e 0a 09 SUFFIX}"; then..
11d0: 09 09 69 66 20 74 65 73 74 20 22 24 7b 54 43 4c ..if test "${TCL
11e0: 45 58 54 5f 54 4c 53 5f 53 54 41 54 49 43 5f 53 EXT_TLS_STATIC_S
11f0: 53 4c 7d 22 20 3d 3d 20 27 6e 6f 27 3b 20 74 68 SL}" == 'no'; th
1200: 65 6e 0a 09 09 09 09 54 43 4c 54 4c 53 5f 53 53 en.....TCLTLS_SS
1210: 4c 5f 4c 49 42 53 3d 22 2d 4c 24 6f 70 65 6e 73 L_LIBS="-L$opens
1220: 73 6c 6c 69 62 64 69 72 20 2d 6c 63 72 79 70 74 sllibdir -lcrypt
1230: 6f 20 2d 6c 73 73 6c 22 0a 09 09 09 65 6c 73 65 o -lssl"....else
1240: 0a 09 09 09 09 23 20 4c 69 6e 75 78 20 61 6e 64 .....# Linux and
1250: 20 53 6f 6c 61 72 69 73 0a 09 09 09 09 54 43 4c Solaris.....TCL
1260: 54 4c 53 5f 53 53 4c 5f 4c 49 42 53 3d 22 2d 57 TLS_SSL_LIBS="-W
1270: 6c 2c 2d 42 73 74 61 74 69 63 20 60 24 50 4b 47 l,-Bstatic `$PKG
1280: 5f 43 4f 4e 46 49 47 20 2d 2d 73 74 61 74 69 63 _CONFIG --static
1290: 20 2d 2d 6c 69 62 73 20 63 72 79 70 74 6f 20 73 --libs crypto s
12a0: 73 6c 60 20 2d 57 6c 2c 2d 42 64 79 6e 61 6d 69 sl` -Wl,-Bdynami
12b0: 63 22 0a 09 09 09 09 23 20 48 50 55 58 0a 09 09 c".....# HPUX...
12c0: 09 09 23 20 2d 57 6c 2c 2d 61 2c 61 72 63 68 69 ..# -Wl,-a,archi
12d0: 76 65 20 2e 2e 2e 20 2d 57 6c 2c 2d 61 2c 73 68 ve ... -Wl,-a,sh
12e0: 61 72 65 64 5f 61 72 63 68 69 76 65 0a 09 09 09 ared_archive....
12f0: 66 69 0a 09 09 65 6c 73 65 0a 09 09 09 41 43 5f fi...else....AC_
1300: 4d 53 47 5f 45 52 52 4f 52 28 5b 55 6e 61 62 6c MSG_ERROR([Unabl
1310: 65 20 74 6f 20 6c 6f 63 61 74 65 20 6c 69 62 73 e to locate libs
1320: 73 6c 24 7b 53 48 4c 49 42 5f 53 55 46 46 49 58 sl${SHLIB_SUFFIX
1330: 7d 5d 29 0a 09 09 66 69 0a 09 65 6c 73 65 0a 09 }])...fi..else..
1340: 09 54 43 4c 54 4c 53 5f 53 53 4c 5f 4c 49 42 53 .TCLTLS_SSL_LIBS
1350: 3d 22 2d 6c 63 72 79 70 74 6f 20 2d 6c 73 73 6c ="-lcrypto -lssl
1360: 22 0a 09 66 69 0a 0a 0a 09 64 6e 6c 20 49 6e 63 "..fi....dnl Inc
1370: 6c 75 64 65 20 63 6f 6e 66 69 67 20 76 61 72 69 lude config vari
1380: 61 62 6c 65 73 20 69 6e 20 2d 2d 68 65 6c 70 20 ables in --help
1390: 6c 69 73 74 20 61 6e 64 20 6d 61 6b 65 20 61 76 list and make av
13a0: 61 69 6c 61 62 6c 65 20 74 6f 20 62 65 20 73 75 ailable to be su
13b0: 62 73 74 69 74 75 74 65 64 20 76 69 61 20 41 43 bstituted via AC
13c0: 5f 53 55 42 53 54 2e 0a 09 41 43 5f 41 52 47 5f _SUBST...AC_ARG_
13d0: 56 41 52 28 5b 54 43 4c 54 4c 53 5f 53 53 4c 5f VAR([TCLTLS_SSL_
13e0: 43 46 4c 41 47 53 5d 2c 20 5b 43 20 63 6f 6d 70 CFLAGS], [C comp
13f0: 69 6c 65 72 20 66 6c 61 67 73 20 66 6f 72 20 4f iler flags for O
1400: 70 65 6e 53 53 4c 20 6f 72 20 4c 69 62 72 65 53 penSSL or LibreS
1410: 53 4c 5d 29 0a 09 41 43 5f 41 52 47 5f 56 41 52 SL])..AC_ARG_VAR
1420: 28 5b 54 43 4c 54 4c 53 5f 53 53 4c 5f 49 4e 43 ([TCLTLS_SSL_INC
1430: 4c 55 44 45 53 5d 2c 20 5b 43 20 63 6f 6d 70 69 LUDES], [C compi
1440: 6c 65 72 20 69 6e 63 6c 75 64 65 20 70 61 74 68 ler include path
1450: 73 20 66 6f 72 20 4f 70 65 6e 53 53 4c 20 6f 72 s for OpenSSL or
1460: 20 4c 69 62 72 65 53 53 4c 5d 29 0a 09 41 43 5f LibreSSL])..AC_
1470: 41 52 47 5f 56 41 52 28 5b 54 43 4c 54 4c 53 5f ARG_VAR([TCLTLS_
1480: 53 53 4c 5f 4c 49 42 53 5d 2c 20 5b 6c 69 62 72 SSL_LIBS], [libr
1490: 61 72 69 65 73 20 74 6f 20 70 61 73 73 20 74 6f aries to pass to
14a0: 20 74 68 65 20 6c 69 6e 6b 65 72 20 66 6f 72 20 the linker for
14b0: 4f 70 65 6e 53 53 4c 20 6f 72 20 4c 69 62 72 65 OpenSSL or Libre
14c0: 53 53 4c 5d 29 0a 0a 0a 09 64 6e 6c 20 53 65 74 SSL])....dnl Set
14d0: 20 6c 6f 63 61 74 69 6f 6e 20 6f 66 20 70 6b 67 location of pkg
14e0: 63 6f 6e 66 69 67 20 66 69 6c 65 73 0a 09 41 43 config files..AC
14f0: 5f 41 52 47 5f 57 49 54 48 28 5b 6f 70 65 6e 73 _ARG_WITH([opens
1500: 73 6c 2d 70 6b 67 63 6f 6e 66 69 67 5d 2c 0a 09 sl-pkgconfig],..
1510: 09 41 53 5f 48 45 4c 50 5f 53 54 52 49 4e 47 28 .AS_HELP_STRING(
1520: 5b 2d 2d 77 69 74 68 2d 6f 70 65 6e 73 73 6c 2d [--with-openssl-
1530: 70 6b 67 63 6f 6e 66 69 67 3d 3c 64 69 72 3e 5d pkgconfig=<dir>]
1540: 2c 0a 09 09 09 5b 70 61 74 68 20 74 6f 20 72 6f ,....[path to ro
1550: 6f 74 20 64 69 72 65 63 74 6f 72 79 20 6f 66 20 ot directory of
1560: 4f 70 65 6e 53 53 4c 20 6f 72 20 4c 69 62 72 65 OpenSSL or Libre
1570: 53 53 4c 20 70 6b 67 63 6f 6e 66 69 67 64 69 72 SSL pkgconfigdir
1580: 5d 0a 09 09 29 2c 20 5b 0a 09 09 09 6f 70 65 6e ]...), [....open
1590: 73 73 6c 70 6b 67 63 6f 6e 66 69 67 64 69 72 3d sslpkgconfigdir=
15a0: 22 24 77 69 74 68 76 61 6c 22 0a 09 09 5d 2c 20 "$withval"...],
15b0: 5b 0a 09 09 09 6f 70 65 6e 73 73 6c 70 6b 67 63 [....opensslpkgc
15c0: 6f 6e 66 69 67 64 69 72 3d 27 27 0a 09 09 5d 0a onfigdir=''...].
15d0: 09 29 0a 09 41 43 5f 4d 53 47 5f 43 48 45 43 4b .)..AC_MSG_CHECK
15e0: 49 4e 47 28 5b 66 6f 72 20 4f 70 65 6e 53 53 4c ING([for OpenSSL
15f0: 20 70 6b 67 63 6f 6e 66 69 67 5d 29 0a 09 41 43 pkgconfig])..AC
1600: 5f 4d 53 47 5f 52 45 53 55 4c 54 28 24 6f 70 65 _MSG_RESULT($ope
1610: 6e 73 73 6c 70 6b 67 63 6f 6e 66 69 67 64 69 72 nsslpkgconfigdir
1620: 29 0a 0a 0a 09 23 20 55 73 65 20 50 61 63 6b 61 )....# Use Packa
1630: 67 65 20 43 6f 6e 66 69 67 20 74 6f 6f 6c 20 74 ge Config tool t
1640: 6f 20 67 65 74 20 63 6f 6e 66 69 67 0a 09 70 6b o get config..pk
1650: 67 43 6f 6e 66 69 67 45 78 74 72 61 41 72 67 73 gConfigExtraArgs
1660: 3d 27 27 0a 09 69 66 20 74 65 73 74 20 22 24 7b =''..if test "${
1670: 53 48 41 52 45 44 5f 42 55 49 4c 44 7d 22 20 3d SHARED_BUILD}" =
1680: 3d 20 30 20 2d 6f 20 22 24 54 43 4c 45 58 54 5f = 0 -o "$TCLEXT_
1690: 54 4c 53 5f 53 54 41 54 49 43 5f 53 53 4c 22 20 TLS_STATIC_SSL"
16a0: 3d 20 27 79 65 73 27 3b 20 74 68 65 6e 0a 09 09 = 'yes'; then...
16b0: 70 6b 67 43 6f 6e 66 69 67 45 78 74 72 61 41 72 pkgConfigExtraAr
16c0: 67 73 3d 27 2d 2d 73 74 61 74 69 63 27 0a 09 66 gs='--static'..f
16d0: 69 0a 0a 09 64 6e 6c 20 55 73 65 20 70 6b 67 2d i...dnl Use pkg-
16e0: 63 6f 6e 66 69 67 20 74 6f 20 66 69 6e 64 20 74 config to find t
16f0: 68 65 20 6c 69 62 72 61 72 69 65 73 0a 09 69 66 he libraries..if
1700: 20 74 65 73 74 20 2d 6e 20 22 24 7b 50 4b 47 5f test -n "${PKG_
1710: 43 4f 4e 46 49 47 7d 22 3b 20 74 68 65 6e 0a 09 CONFIG}"; then..
1720: 09 64 6e 6c 20 54 65 6d 70 6f 72 61 72 69 6c 79 .dnl Temporarily
1730: 20 75 70 64 61 74 65 20 50 4b 47 5f 43 4f 4e 46 update PKG_CONF
1740: 49 47 5f 50 41 54 48 0a 09 09 50 4b 47 5f 43 4f IG_PATH...PKG_CO
1750: 4e 46 49 47 5f 50 41 54 48 5f 53 41 56 45 3d 22 NFIG_PATH_SAVE="
1760: 24 7b 50 4b 47 5f 43 4f 4e 46 49 47 5f 50 41 54 ${PKG_CONFIG_PAT
1770: 48 7d 22 0a 09 09 69 66 20 74 65 73 74 20 2d 6e H}"...if test -n
1780: 20 22 24 7b 6f 70 65 6e 73 73 6c 70 6b 67 63 6f "${opensslpkgco
1790: 6e 66 69 67 64 69 72 7d 22 3b 20 74 68 65 6e 0a nfigdir}"; then.
17a0: 09 09 09 69 66 20 21 20 74 65 73 74 20 2d 66 20 ...if ! test -f
17b0: 22 24 7b 6f 70 65 6e 73 73 6c 70 6b 67 63 6f 6e "${opensslpkgcon
17c0: 66 69 67 64 69 72 7d 2f 6f 70 65 6e 73 73 6c 2e figdir}/openssl.
17d0: 70 63 22 3b 20 74 68 65 6e 0a 09 09 09 09 41 43 pc"; then.....AC
17e0: 5f 4d 53 47 5f 45 52 52 4f 52 28 5b 55 6e 61 62 _MSG_ERROR([Unab
17f0: 6c 65 20 74 6f 20 6c 6f 63 61 74 65 20 24 7b 6f le to locate ${o
1800: 70 65 6e 73 73 6c 70 6b 67 63 6f 6e 66 69 67 64 pensslpkgconfigd
1810: 69 72 7d 2f 6f 70 65 6e 73 73 6c 2e 70 63 5d 29 ir}/openssl.pc])
1820: 0a 09 09 09 66 69 0a 0a 09 09 09 50 4b 47 5f 43 ....fi.....PKG_C
1830: 4f 4e 46 49 47 5f 50 41 54 48 3d 22 24 7b 6f 70 ONFIG_PATH="${op
1840: 65 6e 73 73 6c 70 6b 67 63 6f 6e 66 69 67 64 69 ensslpkgconfigdi
1850: 72 7d 24 7b 50 41 54 48 5f 53 45 50 41 52 41 54 r}${PATH_SEPARAT
1860: 4f 52 7d 24 7b 50 4b 47 5f 43 4f 4e 46 49 47 5f OR}${PKG_CONFIG_
1870: 50 41 54 48 7d 22 0a 09 09 09 65 78 70 6f 72 74 PATH}"....export
1880: 20 50 4b 47 5f 43 4f 4e 46 49 47 5f 50 41 54 48 PKG_CONFIG_PATH
1890: 0a 09 09 66 69 0a 09 09 69 66 20 74 65 73 74 20 ...fi...if test
18a0: 2d 7a 20 22 24 54 43 4c 54 4c 53 5f 53 53 4c 5f -z "$TCLTLS_SSL_
18b0: 4c 49 42 53 22 3b 20 74 68 65 6e 0a 09 09 09 54 LIBS"; then....T
18c0: 43 4c 54 4c 53 5f 53 53 4c 5f 4c 49 42 53 3d 22 CLTLS_SSL_LIBS="
18d0: 60 22 24 7b 50 4b 47 5f 43 4f 4e 46 49 47 7d 22 `"${PKG_CONFIG}"
18e0: 20 6f 70 65 6e 73 73 6c 20 2d 2d 6c 69 62 73 20 openssl --libs
18f0: 24 70 6b 67 43 6f 6e 66 69 67 45 78 74 72 61 41 $pkgConfigExtraA
1900: 72 67 73 60 22 20 7c 7c 20 41 43 5f 4d 53 47 5f rgs`" || AC_MSG_
1910: 45 52 52 4f 52 28 5b 55 6e 61 62 6c 65 20 74 6f ERROR([Unable to
1920: 20 67 65 74 20 4f 70 65 6e 53 53 4c 20 43 6f 6e get OpenSSL Con
1930: 66 69 67 75 72 61 74 69 6f 6e 5d 29 0a 09 09 66 figuration])...f
1940: 69 0a 09 09 69 66 20 74 65 73 74 20 2d 7a 20 22 i...if test -z "
1950: 24 54 43 4c 54 4c 53 5f 53 53 4c 5f 43 46 4c 41 $TCLTLS_SSL_CFLA
1960: 47 53 22 3b 20 74 68 65 6e 0a 09 09 09 54 43 4c GS"; then....TCL
1970: 54 4c 53 5f 53 53 4c 5f 43 46 4c 41 47 53 3d 22 TLS_SSL_CFLAGS="
1980: 60 22 24 7b 50 4b 47 5f 43 4f 4e 46 49 47 7d 22 `"${PKG_CONFIG}"
1990: 20 6f 70 65 6e 73 73 6c 20 2d 2d 63 66 6c 61 67 openssl --cflag
19a0: 73 2d 6f 6e 6c 79 2d 6f 74 68 65 72 20 24 70 6b s-only-other $pk
19b0: 67 43 6f 6e 66 69 67 45 78 74 72 61 41 72 67 73 gConfigExtraArgs
19c0: 60 22 20 7c 7c 20 41 43 5f 4d 53 47 5f 45 52 52 `" || AC_MSG_ERR
19d0: 4f 52 28 5b 55 6e 61 62 6c 65 20 74 6f 20 67 65 OR([Unable to ge
19e0: 74 20 4f 70 65 6e 53 53 4c 20 43 6f 6e 66 69 67 t OpenSSL Config
19f0: 75 72 61 74 69 6f 6e 5d 29 0a 09 09 66 69 0a 09 uration])...fi..
1a00: 09 69 66 20 74 65 73 74 20 2d 7a 20 22 24 54 43 .if test -z "$TC
1a10: 4c 54 4c 53 5f 53 53 4c 5f 49 4e 43 4c 55 44 45 LTLS_SSL_INCLUDE
1a20: 53 22 3b 20 74 68 65 6e 0a 09 09 09 54 43 4c 54 S"; then....TCLT
1a30: 4c 53 5f 53 53 4c 5f 49 4e 43 4c 55 44 45 53 3d LS_SSL_INCLUDES=
1a40: 22 60 22 24 7b 50 4b 47 5f 43 4f 4e 46 49 47 7d "`"${PKG_CONFIG}
1a50: 22 20 6f 70 65 6e 73 73 6c 20 2d 2d 63 66 6c 61 " openssl --cfla
1a60: 67 73 2d 6f 6e 6c 79 2d 49 20 24 70 6b 67 43 6f gs-only-I $pkgCo
1a70: 6e 66 69 67 45 78 74 72 61 41 72 67 73 60 22 20 nfigExtraArgs`"
1a80: 7c 7c 20 41 43 5f 4d 53 47 5f 45 52 52 4f 52 28 || AC_MSG_ERROR(
1a90: 5b 55 6e 61 62 6c 65 20 74 6f 20 67 65 74 20 4f [Unable to get O
1aa0: 70 65 6e 53 53 4c 20 43 6f 6e 66 69 67 75 72 61 penSSL Configura
1ab0: 74 69 6f 6e 5d 29 0a 09 09 66 69 0a 09 09 50 4b tion])...fi...PK
1ac0: 47 5f 43 4f 4e 46 49 47 5f 50 41 54 48 3d 22 24 G_CONFIG_PATH="$
1ad0: 7b 50 4b 47 5f 43 4f 4e 46 49 47 5f 50 41 54 48 {PKG_CONFIG_PATH
1ae0: 5f 53 41 56 45 7d 22 0a 09 66 69 0a 5d 29 0a _SAVE}"..fi.]).