Diff

Differences From Artifact [57e33ec54f]:

To Artifact [0c2240a08b]:


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
311
312
313


314
315
316
317
318
319
320
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
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326







+
+

















+
+









+
+







	dnl Sun Studio uses -lCstd -lCrun, most platforms use -lstdc++
	DC_DO_STATIC_LINK_LIB([C++ Library (Sun Studio)], [-lCstd -lCrun],, [
		DC_DO_STATIC_LINK_LIB([C++ Library (UNIX)], [-lstdc++])
	])
])

AC_DEFUN(DC_FIND_TCLKIT_LIBS, [
	AC_CHECK_TOOL(OBJCOPY, objcopy, [:])

	DC_SETUP_TCL_PLAT_DEFS

	WISH_CFLAGS=""

	dnl We will need this for the Tcl project, which we will always have
	DC_CHECK_FOR_WHOLE_ARCHIVE

	for proj in tcl tclvfs tk mk4tcl; do
		AC_MSG_CHECKING([for libraries required for ${proj}])

		libdir="../../../${proj}/inst"
		libfiles="`find "${libdir}" -name '*.a' 2>/dev/null | tr "\n" ' '`"
		libfilesnostub="`find "${libdir}" -name '*.a' 2>/dev/null | grep -v 'stub' | tr "\n" ' '`"

		for libfile in ${libfiles}; do
			LDFLAGS="${LDFLAGS} -L`dirname "${libfile}"`"
		done

		hide_symbols="1"

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

			hide_symbols="0"
		fi

		if test "${proj}" = "mk4tcl"; then
			if test -n "$libfiles"; then
				AC_DEFINE(KIT_INCLUDES_MK4TCL, [1], [Specify this if you link against mkt4tcl])
				DC_DO_STATIC_LINK_LIBCXX
			fi
336
337
338
339
340
341
342


343
344
345
346
347
348





349
350
351
352

353
354
355
356
357
358
359
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373







+
+






+
+
+
+
+




+







				if test -n "${TK_VERSION}"; then
					AC_DEFINE_UNQUOTED(KIT_TK_VERSION, "${TK_VERSION}${TK_PATCH_LEVEL}", [Specify the version of Tk])
				fi

				if test "$host_os" = "mingw32msvc" -o "$host_os" = "mingw32"; then
					WISH_CFLAGS="-mwindows"
				fi

				hide_symbols="0"
			fi
		fi

		ARCHS="${ARCHS} ${libfiles}"

		AC_MSG_RESULT([${libfiles}])

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

	done

	AC_SUBST(WISH_CFLAGS)
	AC_SUBST(ARCHS)
	AC_SUBST(STRIPLIBS)
])

AC_DEFUN(DC_CHECK_FOR_ACCEPTABLE_DLADDR, [
	AC_CHECK_HEADERS(dlfcn.h)
	AC_CHECK_FUNCS(dladdr)

	AC_MSG_CHECKING([for acceptable dladdr])