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
|
AC_DEFINE(BUILD_tk, [1], [Define if you need to pretend to be building Tk (Windows)])
;;
cygwin*)
CFLAGS="${CFLAGS} -mms-bitfields"
;;
esac
])
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" ' '`"
if test "$proj" = "tcl"; then
libfiles="${libfilesnostub}"
fi
if test "$proj" = "tk"; then
libfiles="${libfilesnostub}"
if test -n "$libfiles"; then
DC_DO_TK
AC_DEFINE(KIT_INCLUDES_TK, [1], [Specify this if we link statically to Tk])
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
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|
>
>
>
>
>
<
>
>
>
>
>
>
>
>
|
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
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
|
AC_DEFINE(BUILD_tk, [1], [Define if you need to pretend to be building Tk (Windows)])
;;
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}"
$2
], [
LIBS="${SAVE_LIBS}"
$3
]
)
])
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" ' '`"
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}"
])
])
fi
if test "$proj" = "tk"; then
if test -n "$libfiles"; then
DC_DO_TK
DC_TEST_WHOLE_ARCHIVE_SHARED_LIB([$ARCHS $libfilesnostub], [
libfiles="${libfilesnostub}"
], [
DC_TEST_WHOLE_ARCHIVE_SHARED_LIB([$ARCHS $libfiles], [
libfiles="${libfiles}"
])
])
AC_DEFINE(KIT_INCLUDES_TK, [1], [Specify this if we link statically to Tk])
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
|