Check-in [075e855e95]
Overview
Comment:Fixed find OpenSSL dependencies
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | TEA
Files: files | file ages | folders
SHA3-256: 075e855e953bd88c533a3e661059bd251e911c20b53b39496ef6d2efc065a229
User & Date: bohagan on 2023-05-07 22:12:26
Other Links: branch diff | manifest | tags
Context
2023-05-07
23:21
Added support for the pkgconfig tool to find package installation locations and added configure output messages check-in: aaea8b2ab0 user: bohagan tags: TEA
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
Changes

Modified Makefile.in from [5f5ba3ecee] to [10fd16a9a6].

48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
48
49
50
51
52
53
54










55
56
57
58
59
60
61







-
-
-
-
-
-
-
-
-
-








#========================================================================
# This is a list of public header files to be installed, if any.
#========================================================================

PKG_HEADERS	= @PKG_HEADERS@

#========================================================================
# SSL
#========================================================================

SSL_DIR			= @SSL_DIR@
SSL_LIB_DIR 		= @SSL_LIB_DIR@
SSL_INCLUDE_DIR 	= @SSL_INCLUDE_DIR@
SSL_INCLUDE_DIR_NATIVE	= @SSL_INCLUDE_DIR_NATIVE@
SSL_INCLUDES 		= -I$(SSL_INCLUDE_DIR_NATIVE)

#========================================================================
# "PKG_LIB_FILE" refers to the library (dynamic or static as per
# configuration options) composed of the named objects.
#========================================================================

PKG_LIB_FILE	= @PKG_LIB_FILE@
PKG_LIB_FILE8	= @PKG_LIB_FILE8@

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

644
645
646
647
648
649
650
651
652
653
654
655
656
657
658

659
660
661
662
663
664
665
644
645
646
647
648
649
650





651
652
653
654
655
656
657
658
659
660
661







-
-
-
-
-



+







# include <unistd.h>
#endif"

ac_header_c_list=
ac_subst_vars='LTLIBOBJS
GEN_DH_PARAMS_ARGS
TCLSH_PROG
SSL_LIB_DIR_NATIVE
SSL_INCLUDE_DIR_NATIVE
SSL_INCLUDE_DIR
SSL_LIB_DIR
SSL_DIR
TCLTLS_SSL_CPPFLAGS
TCLTLS_SSL_CFLAGS
TCLTLS_SSL_LIBS
PKGCONFIG
VC_MANIFEST_EMBED_EXE
VC_MANIFEST_EMBED_DLL
RANLIB_STUB
MAKE_STUB_LIB
MAKE_STATIC_LIB
MAKE_SHARED_LIB
MAKE_LIB
9126
9127
9128
9129
9130
9131
9132
9133
9134
9135
9136
9137
9138
9139
9140
9141
9142
9143
9144
9145
9146
9147
9148
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
9122
9123
9124
9125
9126
9127
9128












9129
9130
9131
9132
9133
9134
9135
9136
9137
9138
9139
9140
9141

9142
9143
9144
9145
9146
9147
9148
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







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












+
-
+
+
+
+






-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
-
-
-
-
-
-










+

-
-
-
-
-
-
-
+
-


-
-
-
-

-
+






-
+









	fi

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

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





    SSL_INCLUDE_DIR_NATIVE=\"`${CYGPATH} ${SSL_INCLUDE_DIR}`\"
    SSL_LIB_DIR_NATIVE=\"`${CYGPATH} ${SSL_LIB_DIR}`\"



#--------------------------------------------------------------------
# Shared libraries and static libraries have different names.
# 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

    PKG_CFLAGS="$PKG_CFLAGS ${TCLTLS_SSL_CFLAGS}"
    vars="-I${SSL_INCLUDE_DIR_NATIVE}"



    vars="${TCLTLS_SSL_CPPFLAGS}"
    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

    vars="${TCLTLS_SSL_LIBS}"

    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
else

    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"
    PKG_CFLAGS="$PKG_CFLAGS ${TCLTLS_SSL_CFLAGS}"
    done


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}\""

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



    vars="${LD_SEARCH_FLAGS} -L${SSL_LIB_DIR} -lssl -lcrypto ${GCCPATH} ${GCCLIB}"
    vars="${TCLTLS_SSL_LIBS}"
    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

Modified configure.ac from [43c320a3bc] to [75942eb39f].

164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195

196
197
198


199
200
201
202
203
204
205
206



207
208
209
210
211
212
213
164
165
166
167
168
169
170














171
172
173
174
175
176
177
178
179


180



181
182
183

184





185
186
187
188
189
190
191
192
193
194







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









-
-
+
-
-
-
+
+

-

-
-
-
-
-
+
+
+







#--------------------------------------------------------------------
# This marco includes the TCL TLS specific functions to set the
# OpenSSL or LibreSSL config.
#--------------------------------------------------------------------

TCLTLS_SSL_OPENSSL

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

AC_SUBST(SSL_DIR)
AC_SUBST(SSL_LIB_DIR)
AC_SUBST(SSL_INCLUDE_DIR)

SSL_INCLUDE_DIR_NATIVE=\"`${CYGPATH} ${SSL_INCLUDE_DIR}`\"
SSL_LIB_DIR_NATIVE=\"`${CYGPATH} ${SSL_LIB_DIR}`\"
AC_SUBST(SSL_INCLUDE_DIR_NATIVE)
AC_SUBST(SSL_LIB_DIR_NATIVE)

#--------------------------------------------------------------------
# Shared libraries and static libraries have different names.
# 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
	TEA_ADD_INCLUDES([-I${SSL_INCLUDE_DIR_NATIVE}])
	TEA_ADD_LIBS([-L${SSL_LIB_DIR_NATIVE}])
	TEA_ADD_CFLAGS([${TCLTLS_SSL_CFLAGS}])
    else
	TEA_ADD_INCLUDES([-include:${SSL_INCLUDE_DIR_NATIVE}])
	TEA_ADD_LIBS([-libpath:${SSL_LIB_DIR_NATIVE}])
	TEA_ADD_INCLUDES([${TCLTLS_SSL_CPPFLAGS}])
	TEA_ADD_LIBS([${TCLTLS_SSL_LIBS}])
    fi
    TEA_ADD_LIBS([libcrypto.lib libssl.lib])
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}\""
    TEA_ADD_INCLUDES([-I${SSL_INCLUDE_DIR}])
    TEA_ADD_LIBS([${LD_SEARCH_FLAGS} -L${SSL_LIB_DIR} -lssl -lcrypto ${GCCPATH} ${GCCLIB}])
	TEA_ADD_CFLAGS([${TCLTLS_SSL_CFLAGS}])
	TEA_ADD_INCLUDES([${TCLTLS_SSL_CPPFLAGS}])
	TEA_ADD_LIBS([${TCLTLS_SSL_LIBS}])
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