Check-in [7f6e71d240]
Overview
Comment:Fixed make clean and build headers as part of all
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | TEA
Files: files | file ages | folders
SHA3-256: 7f6e71d240025458441862111cdfc5746400bf9953bb0fb887901cc38988c8d3
User & Date: bohagan on 2023-05-07 19:53:17
Other Links: branch diff | manifest | tags
Context
2023-05-07
22:12
Fixed find OpenSSL dependencies check-in: 075e855e95 user: bohagan tags: TEA
19:53
Fixed make clean and build headers as part of all check-in: 7f6e71d240 user: bohagan tags: TEA
19:09
Fixed detect shared library in pkgIndex.tcl file check-in: 515e670c81 user: bohagan tags: TEA
Changes

Modified Makefile.in from [74fcb866e3] to [5f5ba3ecee].

69
70
71
72
73
74
75
76

77
78
79
80
81
82
83
69
70
71
72
73
74
75

76
77
78
79
80
81
82
83







-
+








PKG_LIB_FILE	= @PKG_LIB_FILE@
PKG_LIB_FILE8	= @PKG_LIB_FILE8@
PKG_LIB_FILE9	= @PKG_LIB_FILE9@
PKG_STUB_LIB_FILE = @PKG_STUB_LIB_FILE@

lib_BINARIES	= $(PKG_LIB_FILE)
BINARIES	= $(lib_BINARIES) pkgIndex.tcl
BINARIES	= dh_params.h tls.tcl.h $(lib_BINARIES) pkgIndex.tcl

SHELL		= @SHELL@

srcdir		= @srcdir@
prefix		= @prefix@
exec_prefix	= @exec_prefix@

166
167
168
169
170
171
172
173

174
175
176
177
178
179
180
166
167
168
169
170
171
172

173
174
175
176
177
178
179
180







-
+







# that your library may use.  TCL_DEFS can actually be a problem if
# you do not compile with a similar machine setup as the Tcl core was
# compiled with.
#DEFS		= $(TCL_DEFS) @DEFS@ $(PKG_CFLAGS)
DEFS		= @DEFS@ $(PKG_CFLAGS)

# Move pkgIndex.tcl to 'BINARIES' var if it is generated in the Makefile
CONFIG_CLEAN_FILES = Makefile pkgIndex.tcl
CONFIG_CLEAN_FILES = Makefile pkgIndex.tcl generic/dh_params.h generic/tls.tcl.h
CLEANFILES	= @CLEANFILES@

CPPFLAGS	= @CPPFLAGS@
LIBS		= @PKG_LIBS@ @LIBS@
AR		= @AR@
CFLAGS		= @CFLAGS@
LDFLAGS		= @LDFLAGS@

Modified configure from [fd0fe451c9] to [477a9a0e2a].

652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
652
653
654
655
656
657
658

659
660
661
662
663
664
665







-







SSL_INCLUDE_DIR_NATIVE
SSL_INCLUDE_DIR
SSL_LIB_DIR
SSL_DIR
TCLTLS_SSL_CPPFLAGS
TCLTLS_SSL_CFLAGS
TCLTLS_SSL_LIBS
OPENSSL
VC_MANIFEST_EMBED_EXE
VC_MANIFEST_EMBED_DLL
RANLIB_STUB
MAKE_STUB_LIB
MAKE_STATIC_LIB
MAKE_SHARED_LIB
MAKE_LIB
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440





1441
1442
1443
1444
1445
1446
1447
1428
1429
1430
1431
1432
1433
1434





1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446







-
-
-
-
-
+
+
+
+
+







  --enable-shared         build and link with shared libraries (default: on)
  --enable-stubs          build and link with stub libraries. Always true for
                          shared builds (default: on)
  --enable-64bit          enable 64bit support (default: off)
  --enable-64bit-vis      enable 64bit Sparc VIS support (default: off)
  --disable-rpath         disable rpath support (default: on)
  --enable-symbols        build with debugging symbols (default: off)
  --disable-tls1          disable TLS1 support
  --disable-tls1_1        disable TLS1.1 support
  --disable-tls1_2        disable TLS1.2 support
  --disable-tls1_3        disable TLS1.3 support
  --enable-deterministic  enable deterministic parameters
  --disable-tls1          disable TLS1 protocol
  --disable-tls1_1        disable TLS1.1 protocol
  --disable-tls1_2        disable TLS1.2 protocol
  --disable-tls1_3        disable TLS1.3 protocol
  --enable-deterministic  enable deterministic DH parameters
  --enable-ssl-fastpath   enable using the underlying file descriptor for
                          talking directly to the SSL library
  --enable-static-ssl     enable statically linking to the specified SSL
                          library
  --disable-hardening     disable hardening attempts

Optional Packages:
8911
8912
8913
8914
8915
8916
8917
8918

8919
8920

8921
8922
8923
8924
8925
8926
8927
8928
8929
8930
8931
8932
8910
8911
8912
8913
8914
8915
8916

8917


8918
8919
8920



8921
8922
8923
8924
8925
8926
8927







-
+
-
-
+


-
-
-













#--------------------------------------------------------------------
# If the variable OPENSSL is set, we will build with the OpenSSL
# This marco includes the TCL TLS specific functions to set the
# libraries.  If it is not set, then we will use RSA BSAFE SSL-C
# libraries instead of the default OpenSSL libaries.
# OpenSSL or LibreSSL config.
#--------------------------------------------------------------------

OPENSSL="1"
OPENSSL="1"



	openssldir=''
	opensslpkgconfigdir=''

# Check whether --with-openssl-dir was given.
if test ${with_openssl_dir+y}
9154
9155
9156
9157
9158
9159
9160







9161
9162
9163
9164
9165
9166
9167
9168
9169
9170
9171
9172







9173
9174
9175
9176
9177
9178
9179
9180
9181
9182
9183
9184
9185
9186
9187
9188
9189
9190
9191
9192
9193
9194
9195
9196
9197
9198
9199
9200
9201
9202
9203
9204
9205
9206
9207
9208
9209
9210
9211
9212
9213
9214







9215
9216
9217
9218
9219
9220
9221
9222
9223
9224
9225
9226
9227
9228
9229
9230
9231
9232
9233
9234
9235
9236
9237
9238
9239
9240
9241
9242
9243
9244
9245
9149
9150
9151
9152
9153
9154
9155
9156
9157
9158
9159
9160
9161
9162
9163
9164
9165
9166
9167
9168
9169
9170
9171
9172
9173
9174
9175
9176
9177
9178
9179
9180
9181
9182
9183
9184
9185
9186
9187
9188
9189
9190
9191
9192
9193

9194
9195
9196
9197
9198
9199
9200
9201
9202
9203
9204













9205
9206
9207
9208

9209
9210
9211
9212
9213
9214
9215
9216
9217
9218
9219
9220
9221
9222
9223
9224
9225
9226













9227
9228
9229
9230
9231
9232
9233







+
+
+
+
+
+
+












+
+
+
+
+
+
+












-











-
-
-
-
-
-
-
-
-
-
-
-
-




-
+
+
+
+
+
+
+











-
-
-
-
-
-
-
-
-
-
-
-
-







# Also, windows libraries and unix libraries have different names.
# For the OpenSSL version, I chose to use the same library names that
# OpenSSL uses as its default names.
#--------------------------------------------------------------------

if test "${TEA_PLATFORM}" = "windows" ; then
    if test "$GCC" = "yes"; then

    vars="-I${SSL_INCLUDE_DIR_NATIVE}"
    for i in $vars; do
	PKG_INCLUDES="$PKG_INCLUDES $i"
    done



    vars="-L${SSL_LIB_DIR_NATIVE}"
    for i in $vars; do
	if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then
	    # Convert foo.lib to -lfoo for GCC.  No-op if not *.lib
	    i=`echo "$i" | sed -e 's/^\([^-].*\)\.[lL][iI][bB]$/-l\1/'`
	fi
	PKG_LIBS="$PKG_LIBS $i"
    done


    else

    vars="-include:${SSL_INCLUDE_DIR_NATIVE}"
    for i in $vars; do
	PKG_INCLUDES="$PKG_INCLUDES $i"
    done



    vars="-libpath:${SSL_LIB_DIR_NATIVE}"
    for i in $vars; do
	if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then
	    # Convert foo.lib to -lfoo for GCC.  No-op if not *.lib
	    i=`echo "$i" | sed -e 's/^\([^-].*\)\.[lL][iI][bB]$/-l\1/'`
	fi
	PKG_LIBS="$PKG_LIBS $i"
    done


    fi
    if test -n "${OPENSSL}"; then

    vars="libcrypto.lib libssl.lib"
    for i in $vars; do
	if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then
	    # Convert foo.lib to -lfoo for GCC.  No-op if not *.lib
	    i=`echo "$i" | sed -e 's/^\([^-].*\)\.[lL][iI][bB]$/-l\1/'`
	fi
	PKG_LIBS="$PKG_LIBS $i"
    done


    else

    vars="sslc32.lib"
    for i in $vars; do
	if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then
	    # Convert foo.lib to -lfoo for GCC.  No-op if not *.lib
	    i=`echo "$i" | sed -e 's/^\([^-].*\)\.[lL][iI][bB]$/-l\1/'`
	fi
	PKG_LIBS="$PKG_LIBS $i"
    done


	fi
else
    # Subst runtime dir here, use -R and -L where necessary. [Bug 1742859]
    LIB_RUNTIME_DIR=${SSL_LIB_DIR}
    eval "LD_SEARCH_FLAGS=\"${LD_SEARCH_FLAGS}\""
    if test -n "${OPENSSL}"; then

    vars="-I${SSL_INCLUDE_DIR}"
    for i in $vars; do
	PKG_INCLUDES="$PKG_INCLUDES $i"
    done



    vars="${LD_SEARCH_FLAGS} -L${SSL_LIB_DIR} -lssl -lcrypto ${GCCPATH} ${GCCLIB}"
    for i in $vars; do
	if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then
	    # Convert foo.lib to -lfoo for GCC.  No-op if not *.lib
	    i=`echo "$i" | sed -e 's/^\([^-].*\)\.[lL][iI][bB]$/-l\1/'`
	fi
	PKG_LIBS="$PKG_LIBS $i"
    done


    else

    vars="${LD_SEARCH_FLAGS} -L${SSL_LIB_DIR} -lsslc"
    for i in $vars; do
	if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then
	    # Convert foo.lib to -lfoo for GCC.  No-op if not *.lib
	    i=`echo "$i" | sed -e 's/^\([^-].*\)\.[lL][iI][bB]$/-l\1/'`
	fi
	PKG_LIBS="$PKG_LIBS $i"
    done


    fi
fi

#--------------------------------------------------------------------
# Determine the name of the tclsh and/or wish executables in the
# Tcl and Tk build directories or the location they were installed
# into. These paths are used to support running test cases only,
# the Makefile should not be making use of these paths to generate

Modified configure.ac from [95bee7c746] to [43c320a3bc].

158
159
160
161
162
163
164
165

166
167

168
169
170
171
172
173
174
175
176
177
178
179
158
159
160
161
162
163
164

165


166
167
168



169
170
171
172
173
174
175







-
+
-
-
+


-
-
-







# depends on values set by the TEA_ENABLE_SHARED, TEA_ENABLE_SYMBOLS,
# and TEA_LOAD_TCLCONFIG macros above.
#--------------------------------------------------------------------

TEA_MAKE_LIB

#--------------------------------------------------------------------
# If the variable OPENSSL is set, we will build with the OpenSSL
# This marco includes the TCL TLS specific functions to set the
# libraries.  If it is not set, then we will use RSA BSAFE SSL-C
# libraries instead of the default OpenSSL libaries.
# OpenSSL or LibreSSL config.
#--------------------------------------------------------------------

OPENSSL="1"
AC_SUBST(OPENSSL,"1")

TCLTLS_SSL_OPENSSL

# Temp work-around
SSL_DIR="/usr"
SSL_LIB_DIR=${SSL_DIR}/lib64
SSL_INCLUDE_DIR=${SSL_DIR}/include/openssl

197
198
199
200
201
202
203
204
205

206
207
208
209
210
211
212
213
214
215


216
217
218
219
220
221
222
223
224
225
226
193
194
195
196
197
198
199


200



201
202
203
204



205
206




207
208
209
210
211
212
213







-
-
+
-
-
-




-
-
-
+
+
-
-
-
-







    if test "$GCC" = "yes"; then
	TEA_ADD_INCLUDES([-I${SSL_INCLUDE_DIR_NATIVE}])
	TEA_ADD_LIBS([-L${SSL_LIB_DIR_NATIVE}])
    else
	TEA_ADD_INCLUDES([-include:${SSL_INCLUDE_DIR_NATIVE}])
	TEA_ADD_LIBS([-libpath:${SSL_LIB_DIR_NATIVE}])
    fi
    if test -n "${OPENSSL}"; then
        TEA_ADD_LIBS([libcrypto.lib libssl.lib])
    TEA_ADD_LIBS([libcrypto.lib libssl.lib])
    else
        TEA_ADD_LIBS([sslc32.lib])
    fi
else
    # Subst runtime dir here, use -R and -L where necessary. [Bug 1742859]
    LIB_RUNTIME_DIR=${SSL_LIB_DIR}
    eval "LD_SEARCH_FLAGS=\"${LD_SEARCH_FLAGS}\""
    if test -n "${OPENSSL}"; then
	TEA_ADD_INCLUDES([-I${SSL_INCLUDE_DIR}])
	TEA_ADD_LIBS([${LD_SEARCH_FLAGS} -L${SSL_LIB_DIR} -lssl -lcrypto ${GCCPATH} ${GCCLIB}])
    TEA_ADD_INCLUDES([-I${SSL_INCLUDE_DIR}])
    TEA_ADD_LIBS([${LD_SEARCH_FLAGS} -L${SSL_LIB_DIR} -lssl -lcrypto ${GCCPATH} ${GCCLIB}])
    else
	TEA_ADD_INCLUDES([-I${SSL_INCLUDE_DIR}])
	TEA_ADD_LIBS([${LD_SEARCH_FLAGS} -L${SSL_LIB_DIR} -lsslc])
    fi
fi

#--------------------------------------------------------------------
# Determine the name of the tclsh and/or wish executables in the
# Tcl and Tk build directories or the location they were installed
# into. These paths are used to support running test cases only,
# the Makefile should not be making use of these paths to generate
238
239
240
241
242
243
244
245
246


247
248

249
250
251
252
253


254
255

256
257
258
259
260


261
262

263
264
265
266
267


268
269

270
271
272
273
274
275

276
277
278
279
280
281
282
225
226
227
228
229
230
231


232
233
234

235
236
237
238


239
240
241

242
243
244
245


246
247
248

249
250
251
252


253
254
255

256
257
258
259
260
261

262
263
264
265
266
267
268
269







-
-
+
+

-
+



-
-
+
+

-
+



-
-
+
+

-
+



-
-
+
+

-
+





-
+







#AC_SUBST(SAMPLE_VAR)


#--------------------------------------------------------------------
# Custom
#--------------------------------------------------------------------

dnl Disable support for TLS 1.0
AC_ARG_ENABLE([tls1], AS_HELP_STRING([--disable-tls1], [disable TLS1 support]), [
dnl Disable support for TLS 1.0 protocol
AC_ARG_ENABLE([tls1], AS_HELP_STRING([--disable-tls1], [disable TLS1 protocol]), [
	if test "${enableval}" = "no"; then
		AC_DEFINE([NO_TLS1], [1], [Disable TLS1 support])
		AC_DEFINE([NO_TLS1], [1], [Disable TLS1 protocol])
	fi
])

dnl Disable support for TLS 1.1
AC_ARG_ENABLE([tls1_1], AS_HELP_STRING([--disable-tls1_1], [disable TLS1.1 support]), [
dnl Disable support for TLS 1.1 protocol
AC_ARG_ENABLE([tls1_1], AS_HELP_STRING([--disable-tls1_1], [disable TLS1.1 protocol]), [
	if test "${enableval}" = "no"; then
		AC_DEFINE([NO_TLS1_1], [1], [Disable TLS1.1 support])
		AC_DEFINE([NO_TLS1_1], [1], [Disable TLS1.1 protocol])
	fi
])

dnl Disable support for TLS 1.2
AC_ARG_ENABLE([tls1_2], AS_HELP_STRING([--disable-tls1_2], [disable TLS1.2 support]), [
dnl Disable support for TLS 1.2 protocol
AC_ARG_ENABLE([tls1_2], AS_HELP_STRING([--disable-tls1_2], [disable TLS1.2 protocol]), [
	if test "${enableval}" = "no"; then
		AC_DEFINE([NO_TLS1_2], [1], [Disable TLS1.2 support])
		AC_DEFINE([NO_TLS1_2], [1], [Disable TLS1.2 protocol])
	fi
])

dnl Disable support for TLS 1.3
AC_ARG_ENABLE([tls1_3], AS_HELP_STRING([--disable-tls1_3], [disable TLS1.3 support]), [
dnl Disable support for TLS 1.3 protocol
AC_ARG_ENABLE([tls1_3], AS_HELP_STRING([--disable-tls1_3], [disable TLS1.3 protocol]), [
	if test "${enableval}" = "no"; then
		AC_DEFINE([NO_TLS1_3], [1], [Disable TLS1.3 support])
		AC_DEFINE([NO_TLS1_3], [1], [Disable TLS1.3 protocol])
	fi
])

dnl Enable support for building the same library every time
tcltls_deterministic='false'
AC_ARG_ENABLE([deterministic], AS_HELP_STRING([--enable-deterministic], [enable deterministic parameters]), [
AC_ARG_ENABLE([deterministic], AS_HELP_STRING([--enable-deterministic], [enable deterministic DH parameters]), [
	if test "$enableval" = "yes"; then
		tcltls_deterministic='true'
	fi
])
if test "$tcltls_deterministic" = 'true'; then
	GEN_DH_PARAMS_ARGS='fallback'
else