Diff

Differences From Artifact [7417677dde]:

To Artifact [0b9994b3dd]:


215
216
217
218
219
220
221

222
223
224
225
226
227
228
229
230
231
		cygwin*)
			CFLAGS="${CFLAGS} -mms-bitfields"
			;;
	esac
])

AC_DEFUN(DC_TEST_WHOLE_ARCHIVE_SHARED_LIB, [

	SAVE_LIBS="${LIBS}"

	LIBS="-Wl,--whole-archive $1 -Wl,--no-whole-archive ${SAVE_LIBS}"
	AC_LINK_IFELSE(
		AC_LANG_PROGRAM([[
			]], [[
			]]
		),
		[
			LIBS="${SAVE_LIBS}"







>


|







215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
		cygwin*)
			CFLAGS="${CFLAGS} -mms-bitfields"
			;;
	esac
])

AC_DEFUN(DC_TEST_WHOLE_ARCHIVE_SHARED_LIB, [

	SAVE_LIBS="${LIBS}"

	LIBS="${WHOLEARCHIVE} $1 ${NOWHOLEARCHIVE} ${SAVE_LIBS}"
	AC_LINK_IFELSE(
		AC_LANG_PROGRAM([[
			]], [[
			]]
		),
		[
			LIBS="${SAVE_LIBS}"
239
240
241
242
243
244
245



246
247
248
249
250
251
252
	)
])

AC_DEFUN(DC_FIND_TCLKIT_LIBS, [
	DC_SETUP_TCL_PLAT_DEFS

	WISH_CFLAGS=""




	for proj in tcl tclvfs tk; 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" ' '`"







>
>
>







240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
	)
])

AC_DEFUN(DC_FIND_TCLKIT_LIBS, [
	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; 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" ' '`"
325
326
327
328
329
330
331



































			AC_MSG_RESULT([found])
			AC_DEFINE(HAVE_ACCEPTABLE_DLADDR, [1], [Define to 1 if you have an acceptable dladdr implementation with dli_fname])
		], [
			AC_MSG_RESULT([not found])
		]
	)
])










































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
329
330
331
332
333
334
335
336
337
338
339
340
341
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
			AC_MSG_RESULT([found])
			AC_DEFINE(HAVE_ACCEPTABLE_DLADDR, [1], [Define to 1 if you have an acceptable dladdr implementation with dli_fname])
		], [
			AC_MSG_RESULT([not found])
		]
	)
])

AC_DEFUN(DC_CHECK_FOR_WHOLE_ARCHIVE, [
	AC_MSG_CHECKING([for how to link whole archive])

	SAVE_CFLAGS="${CFLAGS}"

	wholearchive=""

	for check in "-Wl,-z,allextract -Wl,-z,defaultextract" "-Wl,--whole-archive -Wl,--no-whole-archive"; do
		CFLAGS="${SAVE_CFLAGS} ${check}"

		AC_LINK_IFELSE(AC_LANG_PROGRAM([], []),
			[
				wholearchive="${check}"

				break
			]
		)

	done

	CFLAGS="${SAVE_CFLAGS}"

	if test -z "${wholearchive}"; then
		AC_MSG_RESULT([not found])
	else
		AC_MSG_RESULT([${wholearchive}])

		WHOLEARCHIVE=`echo "${wholearchive}" | cut -f 1 -d ' '`
		NOWHOLEARCHIVE=`echo "${wholearchive}" | cut -f 2 -d ' '`
	fi

	AC_SUBST(WHOLEARCHIVE)
	AC_SUBST(NOWHOLEARCHIVE)
])