15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
-
+
-
+
|
# This initializes the environment with PACKAGE_NAME and PACKAGE_VERSION
# set as provided. These will also be added as -D defs in your Makefile
# so you can encode the package version directly into the source files.
# This will also define a special symbol for Windows (BUILD_<PACKAGE_NAME>
# so that we create the export library with the dll.
#-----------------------------------------------------------------------
AC_INIT(tls,1.8.0)
AC_INIT([tls],[1.8.0])
#--------------------------------------------------------------------
# Call TEA_INIT as the first TEA_ macro to set up initial vars.
# This will define a ${TEA_PLATFORM} variable == "unix" or "windows"
# as well as PKG_LIB_FILE and PKG_STUB_LIB_FILE.
#--------------------------------------------------------------------
TEA_INIT()
TEA_INIT
AC_CONFIG_AUX_DIR(tclconfig)
#--------------------------------------------------------------------
# Load the tclConfig.sh file
#--------------------------------------------------------------------
|
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
|
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
|
-
-
+
+
-
+
|
# stub library C source files to compile in TEA_ADD_STUB_SOURCES,
# and runtime Tcl library files in TEA_ADD_TCL_SOURCES.
# This defines PKG(_STUB)_SOURCES, PKG(_STUB)_OBJECTS, PKG_HEADERS
# and PKG_TCL_SOURCES.
#-----------------------------------------------------------------------
TEA_ADD_SOURCES([tls.c tlsBIO.c tlsIO.c tlsX509.c])
TEA_ADD_HEADERS([tls.h])
TEA_ADD_INCLUDES([-I$(SSL_INCLUDE_DIR)])
TEA_ADD_HEADERS([generic/tls.h])
TEA_ADD_INCLUDES([])
TEA_ADD_LIBS([])
TEA_ADD_CFLAGS([])
TEA_ADD_STUB_SOURCES([])
TEA_ADD_TCL_SOURCES([tls.tcl])
TEA_ADD_TCL_SOURCES([library/tls.tcl])
#--------------------------------------------------------------------
#
# You can add more files to clean if your extension creates any extra
# files by extending CLEANFILES.
# Add pkgIndex.tcl if it is generated in the Makefile instead of ./configure
# and change Makefile.in to move it from CONFIG_CLEAN_FILES to BINARIES var.
|
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
|
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
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
|
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
|
#--------------------------------------------------------------------
# If the variable OPENSSL is set, we will build with the OpenSSL
# libraries. If it is not set, then we will use RSA BSAFE SSL-C
# libraries instead of the default OpenSSL libaries.
#--------------------------------------------------------------------
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
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}])
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])
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}])
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.
|
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
|
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
|
-
+
-
+
|
#--------------------------------------------------------------------
# Specify files to substitute AC variables in. You may alternatively
# have a special pkgIndex.tcl.in or other files which require
# substituting the AC variables in. Include these here.
#--------------------------------------------------------------------
#AC_CONFIG_FILES([Makefile pkgIndex.tcl])
AC_CONFIG_FILES([Makefile pkgIndex.tcl])
#AC_CONFIG_FILES([tlsConfig.sh])
#--------------------------------------------------------------------
# Finally, substitute all of the various values into the files
# specified with AC_CONFIG_FILES.
#--------------------------------------------------------------------
AC_OUTPUT([Makefile pkgIndex.tcl])
AC_OUTPUT
|