Diff

Differences From Artifact [0e91c1e1fd]:

To Artifact [4e978303f9]:


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
234
235
236
237
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
234
235
236

237
238
239
240
241
242
243
244
245
246
247
248

249
250
251
252
253
254
255
256







+








+
+
+
+











-
-
+
+
+
+
+
+
+
+
+

+
+
+
+
+
+
+
+










-











-
+











-
+







	DC_CHECK_FOR_WHOLE_ARCHIVE

	echo '/* Dynamically generated. */' > kitInit-libs.h
	libs_init_funcs=""

	for projdir in ../../../*/; do
		proj="`basename "${projdir}"`"
		subprojs="$proj"

		if test "${proj}" = "build"; then
			continue
		fi

		if test "${proj}" = "kitsh"; then
			continue
		fi

		if test "${proj}" = "common"; then
			continue
		fi

		projlibdir="../../../${proj}/inst"

		if test -d "${projlibdir}"; then
			true
		else
			continue
		fi

		AC_MSG_CHECKING([for libraries required for ${proj}])

		projlibfiles="`find "${projlibdir}" -name '*.a' 2>/dev/null | sort | tr "\n" ' '`"
		projlibfilesnostub="`find "${projlibdir}" -name '*.a' 2>/dev/null | grep -v 'stub' | tr "\n" ' '`"
		projlibfiles="`find "${projlibdir}" -name '*.a' 2>/dev/null | sort`"
		projexcludefile="${projlibdir}/kitcreator-nolibs"
		if test -e "${projexcludefile}"; then
			projexclude="`cat "$projexcludefile"`"
			projlibfiles="`echo "$projlibfiles" | egrep -v "$projexclude"`"
		fi

		projlibfilesnostub="`echo "$projlibfiles" | grep -v 'stub' | tr "\n" ' '`"
		projlibfiles="`echo "$projlibfiles" | tr "\n" ' '`"
		projlibextra=""

		if test "$projlibfilesnostub" = ' '; then
			projlibfilesnostub=''
		fi

		if test "$projlibfiles" = ' '; then
			projlibfiles=''
		fi

		for libfile in ${projlibfilesnostub}; do
			if test -f "${libfile}.linkadd"; then
				projlibextra="`cat "${libfile}.linkadd"`"
			fi
		done

		AC_MSG_RESULT([${projlibfilesnostub} ${projlibextra}])

		hide_symbols="1"
		initialize="1"

		if test "${proj}" = "tcl"; then
			DC_TEST_WHOLE_ARCHIVE_SHARED_LIB([$ARCHS $projlibfilesnostub], [
				projlibfiles="${projlibfilesnostub}"
			], [
				DC_TEST_WHOLE_ARCHIVE_SHARED_LIB([$ARCHS $projlibfiles], [
					projlibfiles="${projlibfiles}"
				])
			])

			hide_symbols="0"
			initialize="0"
			subprojs="`echo " $projlibfilesnostub " | sed 's@ [[^ ]]*/@ @g;s@ lib@ @g;s@[[0-9\.]]*\.a@ @g;s@ tdbc[[^ ]]*@ @g;s@ sqlite @ sqlite3 @;s@ tcldde[[0-9]][[0-9]]*s*g* @ @g;s@ tclreg[[0-9]][[0-9]]*s*g* @ @g;s@ tcl[[0-9]]*s*g* @ @g;s@^ *@@;s@ *[$]@@'`"
		fi

		if test "${proj}" = "mk4tcl"; then
			if test -n "${projlibfiles}"; then
				AC_DEFINE(KIT_INCLUDES_MK4TCL, [1], [Specify this if you link against mkt4tcl])

				kc_cv_feature_kit_includes_mk4tcl='1'

				DC_DO_STATIC_LINK_LIBCXX
			fi

			initialize="0"
			subprojs=""
		fi

		if test "${proj}" = "tk"; then
			if test "${projlibfilesnostub}" != ""; then
				DC_DO_TK
				AC_DEFINE(KIT_INCLUDES_TK, [1], [Specify this if we link statically to Tk])
				if test -n "${TK_VERSION}"; then
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


283
284
285
286
287
288
289
269
270
271
272
273
274
275

276
277
278
279

280
281
282
283
284
285
286
287
288
289
290
291

292
293
294



295
296
297
298


299
300
301

302
303
304
305
306
307
308
309
310







-
+



-
+











-
+

+
-
-
-
+
+
+

-
-
+
+

-
+
+







						projlibfiles="${projlibfiles}"
					])
				])

				hide_symbols="0"
			fi

			initialize="0"
			subprojs=""
		fi

		if test "${proj}" = "tclvfs"; then
			initialize="0"
			subprojs=""
		fi

		if test "${hide_symbols}" = "1"; then
			STRIPLIBS="${STRIPLIBS} ${projlibfiles}"
		fi

		dnl Do not explicitly link to Zlib, that will happen elsewhere
		if test "${proj}" = "zlib"; then
			continue
		fi

		if test "${initialize}" = "1"; then
		if test -n "${subprojs}"; then
			if test -n "${projlibfilesnostub}"; then
				for subproj in $subprojs; do
				projucase="`echo ${proj} | dd conv=ucase 2>/dev/null`"
				projtcase="`echo ${projucase} | cut -c 1``echo ${proj} | cut -c 2-`"
				lib_init_func="${projtcase}_Init"
					subprojucase="`echo ${subproj} | dd conv=ucase 2>/dev/null`"
					subprojtcase="`echo ${subprojucase} | cut -c 1``echo ${subproj} | cut -c 2-`"
					lib_init_func="${subprojtcase}_Init"

				echo "#define KIT_INCLUDES_${projucase}" >> kitInit-libs.h
				echo "Tcl_AppInitProc ${lib_init_func};" >> kitInit-libs.h
					echo "#define KIT_INCLUDES_${subprojucase}" >> kitInit-libs.h
					echo "Tcl_AppInitProc ${lib_init_func};" >> kitInit-libs.h

				libs_init_funcs="${libs_init_funcs} ${lib_init_func}"
					libs_init_funcs="${libs_init_funcs} ${lib_init_func}"
				done
			fi
		fi

		ARCHS="${ARCHS} ${projlibfiles}"
		LIBS="${LIBS} ${projlibextra}"
	done