Diff

Differences From Artifact [6f7681a2e1]:

To Artifact [eaa77b3a1b]:


93
94
95
96
97
98
99

100




101
102
103
104
105
106
107
108
109
110
111
112
113
114





115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
		tryopts="--disable-shared"
	fi

	# Disable SSLv2, newer SSL libraries drop support for it entirely
	CFLAGS="${CFLAGS} -DNO_SSL2=1"

	SAVE_CFLAGS="${CFLAGS}"

	for tryopt in $tryopts __fail__; do




		# Clean up, if needed
		make distclean >/dev/null 2>/dev/null
		rm -rf "${INSTDIR}"
		mkdir "${INSTDIR}"

		if [ "${tryopt}" = "__fail__" ]; then
			exit 1
		fi

		if [ "${tryopt}" == "--enable-shared" ]; then
			isshared="1"
		else
			isshared="0"
		fi






		# If build a static TLS for KitDLL, ensure that we use PIC
		# so that it can be linked into the shared object
		if [ "${isshared}" = "0" -a "${KITTARGET}" = "kitdll" ]; then
			CFLAGS="${SAVE_CFLAGS} -fPIC"
		else
			CFLAGS="${SAVE_CFLAGS}"
		fi
		export CFLAGS

		if [ "${isshared}" = '0' ]; then
			sed 's@USE_TCL_STUBS@XXX_TCL_STUBS@g' configure > configure.new
		else
			sed 's@XXX_TCL_STUBS@USE_TCL_STUBS@g' configure > configure.new
		fi
		cat configure.new > configure







>

>
>
>
>














>
>
>
>
>




<
<
|

<







93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128


129
130

131
132
133
134
135
136
137
		tryopts="--disable-shared"
	fi

	# Disable SSLv2, newer SSL libraries drop support for it entirely
	CFLAGS="${CFLAGS} -DNO_SSL2=1"

	SAVE_CFLAGS="${CFLAGS}"
	SAVE_LIBS="${LIBS}"
	for tryopt in $tryopts __fail__; do
		CFLAGS="${SAVE_CFLAGS}"
		LIBS="${SAVE_LIBS}"
		export CFLAGS LIBS

		# Clean up, if needed
		make distclean >/dev/null 2>/dev/null
		rm -rf "${INSTDIR}"
		mkdir "${INSTDIR}"

		if [ "${tryopt}" = "__fail__" ]; then
			exit 1
		fi

		if [ "${tryopt}" == "--enable-shared" ]; then
			isshared="1"
		else
			isshared="0"
		fi

		# If building a shared TLS, add the LINKADD libraries here
		if [ "${isshared}" = '1' ]; then
			LIBS="${LIBS} ${KC_TLS_LINKADD}"
		fi

		# If build a static TLS for KitDLL, ensure that we use PIC
		# so that it can be linked into the shared object
		if [ "${isshared}" = "0" -a "${KITTARGET}" = "kitdll" ]; then


			CFLAGS="${CFLAGS} -fPIC"
		fi


		if [ "${isshared}" = '0' ]; then
			sed 's@USE_TCL_STUBS@XXX_TCL_STUBS@g' configure > configure.new
		else
			sed 's@XXX_TCL_STUBS@USE_TCL_STUBS@g' configure > configure.new
		fi
		cat configure.new > configure
155
156
157
158
159
160
161
162


163
164
165
166
167
168
169
170
171

172
173
174
175
176
177
178
179
180
package ifneeded tls ${TLSVERS} \
    "[list source [file join \$dir tls.tcl]] ; \
     [list load {} tls]"
_EOF_
	fi

	# Determine name of static object
	LINKADDFILE="$(find "${INSTDIR}" -name '*.a' | head -n 1).linkadd"



	## XXX: TODO: Determine what we actually need to link against
	addlibs="-L${SSL_LIB_DIR:-/lib} -lssl -lcrypto ${KC_TLS_LINKADD}"
	addlibs_staticOnly=""
	if [ "${KC_TLS_LINKSSLSTATIC}" = '1' ]; then
		echo "-Wl,-Bstatic ${addlibs} ${addlibs_staticOnly} -Wl,-Bdynamic"
	else
		echo "${addlibs}"
	fi > "${LINKADDFILE}"


	# Install files needed by installation
	cp -r "${INSTDIR}/lib" "${OUTDIR}" || exit 1
	find "${OUTDIR}" -name '*.a' -type f | xargs -n 1 rm -f --

	exit 0
) || exit 1

exit 0







|
>
>

|
|
|
|
|
|
|
|
>









162
163
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
package ifneeded tls ${TLSVERS} \
    "[list source [file join \$dir tls.tcl]] ; \
     [list load {} tls]"
_EOF_
	fi

	# Determine name of static object
	LINKADDFILE="$(find "${INSTDIR}" -name '*.a' | head -n 1)"
	if [ -n "${LINKADDFILE}" ]; then
		LINKADDFILE="${LINKADDFILE}.linkadd"

		## XXX: TODO: Determine what we actually need to link against
		addlibs="-L${SSL_LIB_DIR:-/lib} -lssl -lcrypto ${KC_TLS_LINKADD}"
		addlibs_staticOnly=""
		if [ "${KC_TLS_LINKSSLSTATIC}" = '1' ]; then
			echo "-Wl,-Bstatic ${addlibs} ${addlibs_staticOnly} -Wl,-Bdynamic"
		else
			echo "${addlibs}"
		fi > "${LINKADDFILE}"
	fi

	# Install files needed by installation
	cp -r "${INSTDIR}/lib" "${OUTDIR}" || exit 1
	find "${OUTDIR}" -name '*.a' -type f | xargs -n 1 rm -f --

	exit 0
) || exit 1

exit 0