Check-in [515e670c81]
Overview
Comment:Fixed detect shared library in pkgIndex.tcl file
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | TEA
Files: files | file ages | folders
SHA3-256: 515e670c81943423d80254d057eb4dd6dac399319872f62b7b8330e78fff7fc7
User & Date: bohagan on 2023-05-07 19:09:20
Other Links: branch diff | manifest | tags
Context
2023-05-07
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
17:48
Added options to disable TLS protocols check-in: 124d881bb0 user: bohagan tags: TEA
Changes
112
113
114
115
116
117
118
119

120
121
122
123
124
125
126
112
113
114
115
116
117
118

119
120
121
122
123
124
125
126







-
+







			TCLTLS_SSL_LIBS="-L$openssldir/lib -lssl -lcrypto"
		fi
		TCLTLS_SSL_CFLAGS="-I$openssldir/include"
		TCLTLS_SSL_CPPFLAGS="-I$openssldir/include"
	fi

	pkgConfigExtraArgs=''
	if test "$TCLEXT_BUILD" = "static" -o "$TCLEXT_TLS_STATIC_SSL" = 'yes'; then
	if test "${SHARED_BUILD}" != "1" -o "$TCLEXT_TLS_STATIC_SSL" = 'yes'; then
		pkgConfigExtraArgs='--static'
	fi

	dnl Use pkg-config to find the libraries
	dnl Temporarily update PKG_CONFIG_PATH
	PKG_CONFIG_PATH_SAVE="${PKG_CONFIG_PATH}"
	if test -n "${opensslpkgconfigdir}"; then
142
143
144
145
146
147
148
149

150
151
152
153
154
155
156
157
158

159
160
161
162
163
164
165
142
143
144
145
146
147
148

149
150
151
152
153
154
155
156
157

158
159
160
161
162
163
164
165







-
+








-
+







		TCLTLS_SSL_CFLAGS="`"${PKGCONFIG}" openssl --cflags-only-other $pkgConfigExtraArgs`" || AC_MSG_ERROR([Unable to get OpenSSL Configuration])
	fi
	if test -z "$TCLTLS_SSL_CPPFLAGS"; then
		TCLTLS_SSL_CPPFLAGS="`"${PKGCONFIG}" openssl --cflags-only-I $pkgConfigExtraArgs`" || AC_MSG_ERROR([Unable to get OpenSSL Configuration])
	fi
	PKG_CONFIG_PATH="${PKG_CONFIG_PATH_SAVE}"

	if test "$TCLEXT_BUILD" = "static"; then
	if test "${SHARED_BUILD}" != "1"; then
		dnl If we are doing a static build, save the linker flags for other programs to consume
		rm -f tcltls.${AREXT}.linkadd
		AS_ECHO(["$TCLTLS_SSL_LIBS"]) > tcltls.${AREXT}.linkadd
	fi

	dnl If we have been asked to statically link to the SSL library, specifically tell the linker to do so
	if test "$TCLEXT_TLS_STATIC_SSL" = 'yes'; then
		dnl Don't bother doing this if we aren't actually doing the runtime linking
		if test "$TCLEXT_BUILD" != "static"; then
		if test "${SHARED_BUILD}" = "1"; then
			dnl Split the libraries into SSL and non-SSL libraries
			new_TCLTLS_SSL_LIBS_normal=''
			new_TCLTLS_SSL_LIBS_static=''
			for arg in $TCLTLS_SSL_LIBS; do
				case "${arg}" in
					-L*)
						new_TCLTLS_SSL_LIBS_normal="${new_TCLTLS_SSL_LIBS_normal} ${arg}"
Modified configure from [60bb9afd54] to [fd0fe451c9].
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
644
645
646
647
648
649
650

651
652
653
654
655
656
657







-







# include <unistd.h>
#endif"

ac_header_c_list=
ac_subst_vars='LTLIBOBJS
GEN_DH_PARAMS_ARGS
TCLSH_PROG
TCLEXT_BUILD
SSL_LIB_DIR_NATIVE
SSL_INCLUDE_DIR_NATIVE
SSL_INCLUDE_DIR
SSL_LIB_DIR
SSL_DIR
TCLTLS_SSL_CPPFLAGS
TCLTLS_SSL_CFLAGS
8979
8980
8981
8982
8983
8984
8985
8986

8987
8988
8989
8990
8991
8992
8993
8978
8979
8980
8981
8982
8983
8984

8985
8986
8987
8988
8989
8990
8991
8992







-
+







			TCLTLS_SSL_LIBS="-L$openssldir/lib -lssl -lcrypto"
		fi
		TCLTLS_SSL_CFLAGS="-I$openssldir/include"
		TCLTLS_SSL_CPPFLAGS="-I$openssldir/include"
	fi

	pkgConfigExtraArgs=''
	if test "$TCLEXT_BUILD" = "static" -o "$TCLEXT_TLS_STATIC_SSL" = 'yes'; then
	if test "${SHARED_BUILD}" != "1" -o "$TCLEXT_TLS_STATIC_SSL" = 'yes'; then
		pkgConfigExtraArgs='--static'
	fi

			PKG_CONFIG_PATH_SAVE="${PKG_CONFIG_PATH}"
	if test -n "${opensslpkgconfigdir}"; then
		if ! test -f "${opensslpkgconfigdir}/openssl.pc"; then
			as_fn_error $? "Unable to locate ${opensslpkgconfigdir}/openssl.pc" "$LINENO" 5
9007
9008
9009
9010
9011
9012
9013
9014

9015
9016
9017
9018
9019
9020

9021
9022
9023
9024
9025
9026
9027
9006
9007
9008
9009
9010
9011
9012

9013
9014
9015
9016
9017
9018

9019
9020
9021
9022
9023
9024
9025
9026







-
+





-
+







		TCLTLS_SSL_CFLAGS="`"${PKGCONFIG}" openssl --cflags-only-other $pkgConfigExtraArgs`" || as_fn_error $? "Unable to get OpenSSL Configuration" "$LINENO" 5
	fi
	if test -z "$TCLTLS_SSL_CPPFLAGS"; then
		TCLTLS_SSL_CPPFLAGS="`"${PKGCONFIG}" openssl --cflags-only-I $pkgConfigExtraArgs`" || as_fn_error $? "Unable to get OpenSSL Configuration" "$LINENO" 5
	fi
	PKG_CONFIG_PATH="${PKG_CONFIG_PATH_SAVE}"

	if test "$TCLEXT_BUILD" = "static"; then
	if test "${SHARED_BUILD}" != "1"; then
				rm -f tcltls.${AREXT}.linkadd
		printf "%s\n" "$TCLTLS_SSL_LIBS" > tcltls.${AREXT}.linkadd
	fi

		if test "$TCLEXT_TLS_STATIC_SSL" = 'yes'; then
				if test "$TCLEXT_BUILD" != "static"; then
				if test "${SHARED_BUILD}" = "1"; then
						new_TCLTLS_SSL_LIBS_normal=''
			new_TCLTLS_SSL_LIBS_static=''
			for arg in $TCLTLS_SSL_LIBS; do
				case "${arg}" in
					-L*)
						new_TCLTLS_SSL_LIBS_normal="${new_TCLTLS_SSL_LIBS_normal} ${arg}"
						new_TCLTLS_SSL_LIBS_static="${new_TCLTLS_SSL_LIBS_static} ${arg}"
9133
9134
9135
9136
9137
9138
9139
9140
9141
9142
9143
9144
9145
9146
9147
9148
9149
9150
9151
9132
9133
9134
9135
9136
9137
9138





9139
9140
9141
9142
9143
9144
9145







-
-
-
-
-








	fi

			TCLTLS_SSL_LIBS="${new_TCLTLS_SSL_LIBS_normal} ${new_TCLTLS_SSL_LIBS_static}"
		fi
	fi

#TLS_CHECK_SSL

#AC_CHECK_LIB(crypto, main, [LIBS="$LIBS -lcrypto"])
#AC_CHECK_LIB(ssl, main, [LIBS="$LIBS -lssl"])

	SSL_DIR="/usr"
	SSL_LIB_DIR=${SSL_DIR}/lib64
	SSL_INCLUDE_DIR=${SSL_DIR}/include/openssl




9240
9241
9242
9243
9244
9245
9246
9247
9248
9249
9250
9251
9252
9253
9254
9255
9256
9257
9258
9259
9260
9261
9234
9235
9236
9237
9238
9239
9240








9241
9242
9243
9244
9245
9246
9247







-
-
-
-
-
-
-
-







	PKG_LIBS="$PKG_LIBS $i"
    done


    fi
fi

if test "${SHARED_BUILD}" = "1" ; then
    TCLEXT_BUILD="shared"

else
    TCLEXT_BUILD="static"

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
# a pkgIndex.tcl file or anything else at extension build time.
#--------------------------------------------------------------------
9314
9315
9316
9317
9318
9319
9320
9321

9322
9323
9324
9325
9326
9327
9328
9329
9330
9331
9332
9333
9334

9335
9336
9337
9338
9339
9340
9341
9342
9343
9344
9345
9346
9347

9348
9349
9350
9351
9352
9353
9354
9355
9356
9357
9358
9359
9360

9361
9362
9363
9364
9365
9366
9367
9300
9301
9302
9303
9304
9305
9306

9307
9308
9309
9310
9311
9312
9313
9314
9315
9316
9317
9318
9319

9320
9321
9322
9323
9324
9325
9326
9327
9328
9329
9330
9331
9332

9333
9334
9335
9336
9337
9338
9339
9340
9341
9342
9343
9344
9345

9346
9347
9348
9349
9350
9351
9352
9353







-
+












-
+












-
+












-
+







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

# Check whether --enable-tls1 was given.
if test ${enable_tls1+y}
then :
  enableval=$enable_tls1;
	if (test "${enableval}" = "no"); then
	if test "${enableval}" = "no"; then

printf "%s\n" "#define NO_TLS1 1" >>confdefs.h

	fi

fi


# Check whether --enable-tls1_1 was given.
if test ${enable_tls1_1+y}
then :
  enableval=$enable_tls1_1;
	if (test "${enableval}" = "no"); then
	if test "${enableval}" = "no"; then

printf "%s\n" "#define NO_TLS1_1 1" >>confdefs.h

	fi

fi


# Check whether --enable-tls1_2 was given.
if test ${enable_tls1_2+y}
then :
  enableval=$enable_tls1_2;
	if (test "${enableval}" = "no"); then
	if test "${enableval}" = "no"; then

printf "%s\n" "#define NO_TLS1_2 1" >>confdefs.h

	fi

fi


# Check whether --enable-tls1_3 was given.
if test ${enable_tls1_3+y}
then :
  enableval=$enable_tls1_3;
	if (test "${enableval}" = "no"); then
	if test "${enableval}" = "no"; then

printf "%s\n" "#define NO_TLS1_3 1" >>confdefs.h

	fi

fi

215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
215
216
217
218
219
220
221






222
223
224
225
226
227
228







-
-
-
-
-
-







	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

if test "${SHARED_BUILD}" = "1" ; then
    AC_SUBST(TCLEXT_BUILD,"shared")
else
    AC_SUBST(TCLEXT_BUILD,"static")
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
# a pkgIndex.tcl file or anything else at extension build time.
#--------------------------------------------------------------------
1
2
3
4
5
6
7
8
9
10
11
12
13





14
15
16
17
18




19
20
21
22
1
2
3
4
5
6
7
8





9
10
11
12
13
14




15
16
17
18
19
20
21
22








-
-
-
-
-
+
+
+
+
+

-
-
-
-
+
+
+
+




# -*- tcl -*-
# Tcl package index file, version 1.1
#
if {[package vsatisfies [package provide Tcl] 9.0-]} {
    package ifneeded @PACKAGE_NAME@ @PACKAGE_VERSION@ \
	    [list load [file join $dir @PKG_LIB_FILE9@] [string totitle @PACKAGE_NAME@]]
} elseif {[package vsatisfies [package present Tcl] 8.5-]} {
	package ifneeded @PACKAGE_NAME@ @PACKAGE_VERSION@ [list apply {{dir} {
		if {{@TCLEXT_BUILD@} eq "static"} {
			load {} [string totitle @PACKAGE_NAME@]
		} else {
			load [file join $dir @PKG_LIB_FILE8@] [string totitle @PACKAGE_NAME@]
		}
	if {[string tolower [file extension @PKG_LIB_FILE8@]] in [list ".dll" ".so"]} {
	    load [file join $dir @PKG_LIB_FILE8@] [string totitle @PACKAGE_NAME@]
	} else {
	    load {} [string totitle @PACKAGE_NAME@]
	}

		set initScript [file join $dir @PACKAGE_NAME@.tcl]
		if {[file exists $initScript]} {
			source $initScript
		}
	set initScript [file join $dir @PACKAGE_NAME@.tcl]
	if {[file exists $initScript]} {
		source $initScript
	}
	}} $dir]
} elseif {[package vsatisfies [package present Tcl] 8.4]} {
	package ifneeded @PACKAGE_NAME@ @PACKAGE_VERSION@ [list load [file join $dir @PKG_LIB_FILE8@] [string totitle @PACKAGE_NAME@]]
}