1 dnl ---------------------------------------------------------------------------
2 dnl Guido Draheim <guidod@gmx.de>, original by Alexandre Oliva
6 dnl AC_DEFINE_DIR(VARNAME, DIR [, DESCRIPTION])
10 dnl This macro substitutes (with AC_SUBST) VARNAME with the expansion of
11 dnl itself or the DIR variable if specified, taking care of fixing up
12 dnl ${prefix} and such.
14 dnl Side effect: VARNAME is replaced with the expansion.
16 dnl AC_SUBST_DIR bases on Alexandre Oliva's AC_DEFINE_DIR macro.
18 dnl http://ac-archive.sourceforge.net/Miscellaneous/ac_define_dir.html
19 dnl ---------------------------------------------------------------------------
21 AC_DEFUN([AC_DEFINE_DIR], [
22 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
23 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
24 ac_define_dir=`eval echo [$]$2`
25 ac_define_dir=`eval echo [$]ac_define_dir`
27 AC_DEFINE_UNQUOTED($1, "$ac_define_dir"),
28 AC_DEFINE_UNQUOTED($1, "$ac_define_dir", $3))
31 dnl ---------------------------------------------------------------------------
32 dnl Mathias Hasselmann <mathias.hasselmann@gmx.de> with modifications
33 dnl by Andrey Kiselev <dron@remotesensing.org>
37 dnl AC_SUBST_DIR(VARNAME, [DIR])
41 dnl This macro substitutes (with AC_SUBST) VARNAME with the expansion of itself
42 dnl or the DIR variable if specified, taking care of fixing up ${prefix}
45 dnl Side effect: VARNAME is replaced with the expansion.
47 dnl AC_SUBST_DIR bases on Alexandre Oliva's AC_DEFINE_DIR macro.
49 dnl http://ac-archive.sourceforge.net/Miscellaneous/ac_subst_dir.html
50 dnl ---------------------------------------------------------------------------
52 AC_DEFUN([AC_SUBST_DIR], [
53 ifelse($2, , , $1=[$]$2)
54 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
55 test "x$exec_prefix" = xNONE && exec_prefix="${prefix}"
61 dnl ---------------------------------------------------------------------------
62 dnl Following macros for Tcl and Tk searching copied from Expect package
63 dnl Several Debian-specific additions by
64 dnl Andrey Kiselev <dron@remotesensing.org>
65 dnl ---------------------------------------------------------------------------
67 AC_DEFUN(CY_AC_PATH_TCLH, [
69 # Ok, lets find the tcl source trees so we can use the headers
70 # Warning: transition of version 9 to 10 will break this algorithm
71 # because 10 sorts before 9. We also look for just tcl. We have to
72 # be careful that we don't match stuff like tclX by accident.
73 # the alternative search directory is involked by --with-tclinclude
76 AC_MSG_CHECKING(for Tcl private headers)
77 AC_ARG_WITH(tclinclude, [ --with-tclinclude=DIR directory where tcl private headers are], with_tclinclude=${withval})
78 AC_CACHE_VAL(ac_cv_c_tclh,[
79 # first check to see if --with-tclinclude was specified
80 if test x"${with_tclinclude}" != x ; then
81 if test -f ${with_tclinclude}/tclInt.h ; then
82 ac_cv_c_tclh=`(cd ${with_tclinclude}; pwd)`
83 elif test -f ${with_tclinclude}/generic/tclInt.h ; then
84 ac_cv_c_tclh=`(cd ${with_tclinclude}/generic; pwd)`
86 AC_MSG_ERROR([${with_tclinclude} directory doesn't contain private headers])
90 # next check if it came with Tcl configuration file
91 if test x"${ac_cv_c_tclconfig}" != x ; then
92 if test -f $ac_cv_c_tclconfig/../generic/tclInt.h ; then
93 ac_cv_c_tclh=`(cd $ac_cv_c_tclconfig/../generic; pwd)`
97 # next check in private source directory
99 # since ls returns lowest version numbers first, reverse its output
100 if test x"${ac_cv_c_tclh}" = x ; then
103 `ls -dr ${srcdir}/../tcl[[9]].[[0-9]].[[0-9]] ${srcdir}/../tcl[[9]].[[0-9]] 2>/dev/null` \
104 `ls -dr ${srcdir}/../tcl[[8]].[[2-9]].[[0-9]] ${srcdir}/../tcl[[8]].[[2-9]] 2>/dev/null` \
105 ${srcdir}/../../tcl \
106 `ls -dr ${srcdir}/../../tcl[[9]].[[0-9]].[[0-9]] ${srcdir}/../../tcl[[9]].[[0-9]] 2>/dev/null` \
107 `ls -dr ${srcdir}/../../tcl[[8]].[[2-9]].[[0-9]] ${srcdir}/../../tcl[[8]].[[2-9]] 2>/dev/null` \
108 ${srcdir}/../../../tcl \
109 `ls -dr ${srcdir}/../../../tcl[[9]].[[0-9]].[[0-9]] ${srcdir}/../../../tcl[[9]].[[0-9]] 2>/dev/null ` \
110 `ls -dr ${srcdir}/../../../tcl[[8]].[[2-9]].[[0-9]] ${srcdir}/../../../tcl[[8]].[[2-9]] 2>/dev/null ` ; do
111 if test -f $i/generic/tclInt.h ; then
112 ac_cv_c_tclh=`(cd $i/generic; pwd)`
118 # check Debian-specific locations
119 if test x"${ac_cv_c_tclh}" = x ; then
121 `ls -dr /usr/include/tcl[[9]].[[0-9]].[[0-9]]/tcl-private /usr/include/tcl[[9]].[[0-9]]/tcl-private 2>/dev/null` \
122 `ls -dr /usr/include/tcl[[8]].[[2-9]].[[0-9]]/tcl-private /usr/include/tcl[[8]].[[2-9]]/tcl-private 2>/dev/null`; do
123 if test -f $i/generic/tclInt.h ; then
124 ac_cv_c_tclh=`(cd $i/generic; pwd)`
130 # finally check in a few common install locations
132 # since ls returns lowest version numbers first, reverse its output
133 if test x"${ac_cv_c_tclh}" = x ; then
135 `ls -dr /usr/lib/tcl[[9]].[[0-9]].[[0-9]]/tcl-private /usr/lib/tcl[[9]].[[0-9]]/tcl-private 2>/dev/null` \
136 `ls -dr /usr/lib/tcl[[8]].[[2-9]].[[0-9]]/tcl-private /usr/lib/tcl[[8]].[[2-9]]/tcl-private 2>/dev/null` \
137 `ls -dr /usr/local/src/tcl[[9]].[[0-9]].[[0-9]] /usr/local/src/tcl[[9]].[[0-9]] 2>/dev/null` \
138 `ls -dr /usr/local/src/tcl[[8]].[[2-9]].[[0-9]] /usr/local/src/tcl[[8]].[[2-9]] 2>/dev/null` \
139 `ls -dr /usr/local/lib/tcl[[9]].[[0-9]].[[0-9]] /usr/local/lib/tcl[[9]].[[0-9]] 2>/dev/null` \
140 `ls -dr /usr/local/lib/tcl[[8]].[[2-9]].[[0-9]] /usr/local/lib/tcl[[8]].[[2-9]] 2>/dev/null` \
143 ${prefix}/include ; do
144 if test -f $i/generic/tclInt.h ; then
145 ac_cv_c_tclh=`(cd $i/generic; pwd)`
150 # see if one is installed
151 if test x"${ac_cv_c_tclh}" = x ; then
152 AC_HEADER_CHECK(tclInt.h, ac_cv_c_tclh=installed, ac_cv_c_tclh="")
155 if test x"${ac_cv_c_tclh}" = x ; then
156 TCLHDIR="# no Tcl private headers found"
157 TCLHDIRDASHI="# no Tcl private headers found"
158 AC_MSG_ERROR([Can't find Tcl private headers])
160 if test x"${ac_cv_c_tclh}" != x ; then
162 if test x"${ac_cv_c_tclh}" = x"installed" ; then
163 AC_MSG_RESULT([is installed])
168 AC_MSG_RESULT([found in ${ac_cv_c_tclh}])
169 # this hack is cause the TCLHDIR won't print if there is a "-I" in it.
170 TCLHDIR="${ac_cv_c_tclh}"
171 TCLHDIRDASHI="-I${ac_cv_c_tclh}"
172 TCL_LIBRARY=`echo $TCLHDIR | sed -e 's/generic//'`library
177 AC_SUBST(TCLHDIRDASHI)
178 AC_SUBST(TCL_LIBRARY)
182 AC_DEFUN(CY_AC_PATH_TCLCONFIG, [
184 # Ok, lets find the tcl configuration
185 # First, look for one uninstalled.
186 # the alternative search directory is invoked by --with-tcl
189 if test x"${no_tcl}" = x ; then
190 # we reset no_tcl in case something fails here
192 AC_ARG_WITH(tcl, [ --with-tcl directory containing tcl configuration (tclConfig.sh)],
193 with_tclconfig=${withval})
194 AC_MSG_CHECKING([for Tcl configuration])
195 AC_CACHE_VAL(ac_cv_c_tclconfig,[
197 # First check to see if --with-tcl was specified.
198 if test x"${with_tclconfig}" != x ; then
199 if test -f "${with_tclconfig}/tclConfig.sh" ; then
200 ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
202 AC_MSG_ERROR([${with_tclconfig} directory doesn't contain tclConfig.sh])
206 # then check for a private Tcl installation
207 if test x"${ac_cv_c_tclconfig}" = x ; then
210 `ls -dr ../tcl[[9]].[[0-9]].[[0-9]] ../tcl[[9]].[[0-9]] 2>/dev/null` \
211 `ls -dr ../tcl[[8]].[[2-9]].[[0-9]] ../tcl[[8]].[[2-9]] 2>/dev/null` \
213 `ls -dr ../../tcl[[9]].[[0-9]].[[0-9]] ../../tcl[[9]].[[0-9]] 2>/dev/null` \
214 `ls -dr ../../tcl[[8]].[[2-9]].[[0-9]] ../../tcl[[8]].[[2-9]] 2>/dev/null` \
216 `ls -dr ../../../tcl[[9]].[[0-9]].[[0-9]] ../../../tcl[[9]].[[0-9]] 2>/dev/null` \
217 `ls -dr ../../../tcl[[8]].[[2-9]].[[0-9]] ../../../tcl[[8]].[[2-9]] 2>/dev/null` ; do
218 if test -f "$i/unix/tclConfig.sh" ; then
219 ac_cv_c_tclconfig=`(cd $i/unix; pwd)`
224 # check in a few common install locations
225 if test x"${ac_cv_c_tclconfig}" = x ; then
226 for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
227 if test -f "$i/tclConfig.sh" ; then
228 ac_cv_c_tclconfig=`(cd $i; pwd)`
234 # check Debian-specific locations
235 if test x"${ac_cv_c_tclconfig}" = x ; then
237 `ls -dr /usr/lib/tcl[[9]].[[0-9]].[[0-9]] /usr/lib/tcl[[9]].[[0-9]] 2>/dev/null` \
238 `ls -dr /usr/lib/tcl[[8]].[[2-9]].[[0-9]] /usr/lib/tcl[[8]].[[2-9]] 2>/dev/null` ; do
239 if test -f "$i/tclConfig.sh" ; then
240 ac_cv_c_tclconfig=`(cd $i; pwd)`
246 # check in a few other private locations
247 if test x"${ac_cv_c_tclconfig}" = x ; then
250 `ls -dr ${srcdir}/../tcl[[9]].[[0-9]].[[0-9]] ${srcdir}/../tcl[[9]].[[0-9]] 2>/dev/null` \
251 `ls -dr ${srcdir}/../tcl[[8]].[[2-9]].[[0-9]] ${srcdir}/../tcl[[8]].[[2-9]] 2>/dev/null` ; do
252 if test -f "$i/unix/tclConfig.sh" ; then
253 ac_cv_c_tclconfig=`(cd $i/unix; pwd)`
259 if test x"${ac_cv_c_tclconfig}" = x ; then
260 TCLCONFIG="# no Tcl configs found"
261 AC_MSG_WARN(Can't find Tcl configuration definitions)
264 TCLCONFIG=${ac_cv_c_tclconfig}/tclConfig.sh
265 AC_MSG_RESULT(found $TCLCONFIG)
270 # Defined as a separate macro so we don't have to cache the values
271 # from PATH_TCLCONFIG (because this can also be cached).
272 AC_DEFUN(CY_AC_LOAD_TCLCONFIG, [
275 dnl AC_SUBST(TCL_VERSION)
276 dnl AC_SUBST(TCL_MAJOR_VERSION)
277 dnl AC_SUBST(TCL_MINOR_VERSION)
280 dnl following is just to test if missing symbol can be handled by configure
281 AC_SUBST(TCL_DELETEME)
284 dnl not used, don't export to save symbols
285 dnl AC_SUBST(TCL_LIB_FILE)
287 dnl don't export, not used outside of configure
288 dnl AC_SUBST(TCL_LIBS)
289 dnl not used, don't export to save symbols
290 dnl AC_SUBST(TCL_PREFIX)
292 AC_SUBST(TCL_EXEC_PREFIX)
294 dnl not used, don't export to save symbols
295 dnl AC_SUBST(TCL_SHLIB_CFLAGS)
296 AC_SUBST(TCL_SHLIB_LD)
297 dnl don't export, not used outside of configure
298 dnl AC_SUBST(TCL_SHLIB_LD_LIBS)
300 # Tcl defines TCL_SHLIB_SUFFIX but TCL_SHARED_LIB_SUFFIX then looks for it
301 # as just SHLIB_SUFFIX. How bizarre.
302 SHLIB_SUFFIX=$TCL_SHLIB_SUFFIX
303 AC_SUBST(SHLIB_SUFFIX)
305 dnl not used, don't export to save symbols
306 dnl AC_SUBST(TCL_DL_LIBS)
307 AC_SUBST(TCL_LD_FLAGS)
308 dnl don't export, not used outside of configure
309 dnl AC_SUBST(TCL_LD_SEARCH_FLAGS)
310 dnl AC_SUBST(TCL_COMPAT_OBJS)
311 dnl AC_SUBST(TCL_RANLIB)
313 # if Tcl's build directory has been removed, TCL_LIB_SPEC should
314 # be used instead of TCL_BUILD_LIB_SPEC
316 # eval used to expand out TCL_DBGX
317 eval "LIBS=\"$TCL_BUILD_LIB_SPEC $TCL_LIBS\""
318 AC_MSG_CHECKING([Tcl build library])
321 AC_CHECK_FUNC(Tcl_CreateCommand,[
322 AC_MSG_CHECKING([if Tcl library build specification is valid])
325 TCL_BUILD_LIB_SPEC=$TCL_LIB_SPEC
326 # Can't pull the following CHECKING call out since it will be
327 # broken up by the CHECK_FUNC just above.
328 AC_MSG_CHECKING([if Tcl library build specification is valid])
333 AC_SUBST(TCL_BUILD_LIB_SPEC)
334 AC_SUBST(TCL_LIB_SPEC)
335 dnl AC_SUBST(TCL_LIB_VERSIONS_OK)
337 AC_SUBST(TCL_SHARED_LIB_SUFFIX)
339 dnl not used, don't export to save symbols
340 dnl AC_SUBST(TCL_UNSHARED_LIB_SUFFIX)
343 # Warning: Tk definitions are very similar to Tcl definitions but
344 # are not precisely the same. There are a couple of differences,
345 # so don't do changes to Tcl thinking you can cut and paste it do
346 # the Tk differences and later simply substitute "Tk" for "Tcl".
348 # - Acceptable Tcl major version #s is 8.2-9.* while Tk is 8.2-9.*
349 # - Searching for Tcl includes looking for tclInt.h, Tk looks for tk.h
350 # - Computing major/minor versions is different because Tk depends on
351 # headers to Tcl, Tk, and X.
352 # - Symbols in tkConfig.sh are different than tclConfig.sh
353 # - Acceptable for Tk to be missing but not Tcl.
355 AC_DEFUN(CY_AC_PATH_TKH, [
357 # Ok, lets find the tk source trees so we can use the headers
358 # If the directory (presumably symlink) named "tk" exists, use that one
359 # in preference to any others. Same logic is used when choosing library
360 # and again with Tcl. The search order is the best place to look first, then in
361 # decreasing significance. The loop breaks if the trigger file is found.
362 # Note the gross little conversion here of srcdir by cd'ing to the found
363 # directory. This converts the path from a relative to an absolute, so
364 # recursive cache variables for the path will work right. We check all
365 # the possible paths in one loop rather than many seperate loops to speed
367 # the alternative search directory is involked by --with-tkinclude
370 AC_MSG_CHECKING(for Tk private headers)
371 AC_ARG_WITH(tkinclude, [ --with-tkinclude directory where tk private headers are], with_tkinclude=${withval})
372 AC_CACHE_VAL(ac_cv_c_tkh,[
373 # first check to see if --with-tkinclude was specified
374 if test x"${with_tkinclude}" != x ; then
375 if test -f ${with_tkinclude}/tk.h ; then
376 ac_cv_c_tkh=`(cd ${with_tkinclude}; pwd)`
377 elif test -f ${with_tkinclude}/generic/tk.h ; then
378 ac_cv_c_tkh=`(cd ${with_tkinclude}/generic; pwd)`
380 AC_MSG_ERROR([${with_tkinclude} directory doesn't contain private headers])
384 # next check if it came with Tk configuration file
385 if test x"${ac_cv_c_tkconfig}" != x ; then
386 if test -f $ac_cv_c_tkconfig/../generic/tk.h ; then
387 ac_cv_c_tkh=`(cd $ac_cv_c_tkconfig/../generic; pwd)`
391 # next check in private source directory
393 # since ls returns lowest version numbers first, reverse its output
394 if test x"${ac_cv_c_tkh}" = x ; then
397 `ls -dr ${srcdir}/../tk[[4-9]].[[0-9]].[[0-9]] ${srcdir}/../tk[[4-9]].[[0-9]] 2>/dev/null` \
398 `ls -dr ${srcdir}/../tk[[4-9]].[[0-9]].[[0-9]] ${srcdir}/../tk[[4-9]].[[0-9]] 2>/dev/null` \
400 `ls -dr ${srcdir}/../../tk[[4-9]].[[0-9]].[[0-9]] ${srcdir}/../../tk[[4-9]].[[0-9]] 2>/dev/null` \
401 `ls -dr ${srcdir}/../../tk[[4-9]].[[0-9]].[[0-9]] ${srcdir}/../../tk[[4-9]].[[0-9]] 2>/dev/null` \
402 ${srcdir}/../../../tk \
403 `ls -dr ${srcdir}/../../../tk[[4-9]].[[0-9]].[[0-9]] ${srcdir}/../../../tk[[4-9]].[[0-9]] 2>/dev/null ` \
404 `ls -dr ${srcdir}/../../../tk[[4-9]].[[0-9]].[[0-9]] ${srcdir}/../../../tk[[4-9]].[[0-9]] 2>/dev/null ` ; do
405 if test -f $i/generic/tk.h ; then
406 ac_cv_c_tkh=`(cd $i/generic; pwd)`
412 # check Debian-specific locations
413 if test x"${ac_cv_c_tkh}" = x ; then
415 `ls -dr /usr/include/tcl[[9]].[[0-9]].[[0-9]]/tk-private /usr/include/tcl[[9]].[[0-9]]/tk-private 2>/dev/null` \
416 `ls -dr /usr/include/tcl[[8]].[[2-9]].[[0-9]]/tk-private /usr/include/tcl[[8]].[[2-9]]/tk-private 2>/dev/null` ; do
417 if test -f $i/generic/tk.h ; then
418 ac_cv_c_tkh=`(cd $i/generic; pwd)`
424 # finally check in a few common install locations
426 # since ls returns lowest version numbers first, reverse its output
427 if test x"${ac_cv_c_tkh}" = x ; then
429 `ls -dr /usr/local/src/tk[[4-9]].[[0-9]].[[0-9]] /usr/local/src/tk[[4-9]].[[0-9]] 2>/dev/null` \
430 `ls -dr /usr/local/src/tk[[4-9]].[[0-9]].[[0-9]] /usr/local/src/tk[[4-9]].[[0-9]] 2>/dev/null` \
431 `ls -dr /usr/local/lib/tk[[4-9]].[[0-9]].[[0-9]] /usr/local/lib/tk[[4-9]].[[0-9]] 2>/dev/null` \
432 `ls -dr /usr/local/lib/tk[[4-9]].[[0-9]].[[0-9]] /usr/local/lib/tk[[4-9]].[[0-9]] 2>/dev/null` \
435 ${prefix}/include ; do
436 if test -f $i/generic/tk.h ; then
437 ac_cv_c_tkh=`(cd $i/generic; pwd)`
442 # see if one is installed
443 if test x"${ac_cv_c_tkh}" = x ; then
444 AC_HEADER_CHECK(tk.h, ac_cv_c_tkh=installed, ac_cv_c_tkh="")
447 if test x"${ac_cv_c_tkh}" != x ; then
449 if test x"${ac_cv_c_tkh}" = x"installed" ; then
450 AC_MSG_RESULT([is installed])
453 AC_MSG_RESULT([found in ${ac_cv_c_tkh}])
454 # this hack is cause the TKHDIRDASHI won't print if there is a "-I" in it.
455 TKHDIRDASHI="-I${ac_cv_c_tkh}"
458 TKHDIRDASHI="# no Tk directory found"
459 AC_MSG_WARN([Can't find Tk private headers])
463 AC_SUBST(TKHDIRDASHI)
467 AC_DEFUN(CY_AC_PATH_TKCONFIG, [
469 # Ok, lets find the tk configuration
470 # First, look for one uninstalled.
471 # the alternative search directory is invoked by --with-tk
474 if test x"${no_tk}" = x ; then
475 # we reset no_tk in case something fails here
477 AC_ARG_WITH(tk, [ --with-tk directory containing tk configuration (tkConfig.sh)],
478 with_tkconfig=${withval})
479 AC_MSG_CHECKING([for Tk configuration])
480 AC_CACHE_VAL(ac_cv_c_tkconfig,[
482 # First check to see if --with-tk was specified.
483 if test x"${with_tkconfig}" != x ; then
484 if test -f "${with_tkconfig}/tkConfig.sh" ; then
485 ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
487 AC_MSG_ERROR([${with_tkconfig} directory doesn't contain tkConfig.sh])
491 # then check for a private Tk library
492 if test x"${ac_cv_c_tkconfig}" = x ; then
495 `ls -dr ../tk[[4-9]].[[0-9]].[[0-9]] ../tk[[4-9]].[[0-9]] 2>/dev/null` \
496 `ls -dr ../tk[[4-9]].[[0-9]].[[0-9]] ../tk[[4-9]].[[0-9]] 2>/dev/null` \
498 `ls -dr ../../tk[[4-9]].[[0-9]].[[0-9]] ../../tk[[4-9]].[[0-9]] 2>/dev/null` \
499 `ls -dr ../../tk[[4-9]].[[0-9]].[[0-9]] ../../tk[[4-9]].[[0-9]] 2>/dev/null` \
501 `ls -dr ../../../tk[[4-9]].[[0-9]].[[0-9]] ../../../tk[[4-9]].[[0-9]] 2>/dev/null` \
502 `ls -dr ../../../tk[[4-9]].[[0-9]].[[0-9]] ../../../tk[[4-9]].[[0-9]] 2>/dev/null` ; do
503 if test -f "$i/unix/tkConfig.sh" ; then
504 ac_cv_c_tkconfig=`(cd $i/unix; pwd)`
509 # check in a few common install locations
510 if test x"${ac_cv_c_tkconfig}" = x ; then
511 for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
512 if test -f "$i/tkConfig.sh" ; then
513 ac_cv_c_tkconfig=`(cd $i; pwd)`
518 # check Debian-specific locations
519 if test x"${ac_cv_c_tkconfig}" = x ; then
521 `ls -dr /usr/lib/tk[[4-9]].[[0-9]].[[0-9]] /usr/lib/tk[[4-9]].[[0-9]] 2>/dev/null` \
522 `ls -dr /usr/lib/tk[[4-9]].[[0-9]].[[0-9]] /usr/lib/tk[[4-9]].[[0-9]] 2>/dev/null` ; do
523 if test -f "$i/tkConfig.sh" ; then
524 ac_cv_c_tkconfig=`(cd $i; pwd)`
529 # check in a few other private locations
530 if test x"${ac_cv_c_tkconfig}" = x ; then
533 `ls -dr ${srcdir}/../tk[[4-9]].[[0-9]].[[0-9]] ${srcdir}/../tk[[4-9]].[[0-9]] 2>/dev/null` \
534 `ls -dr ${srcdir}/../tk[[4-9]].[[0-9]].[[0-9]] ${srcdir}/../tk[[4-9]].[[0-9]] 2>/dev/null` ; do
535 if test -f "$i/unix/tkConfig.sh" ; then
536 ac_cv_c_tkconfig=`(cd $i/unix; pwd)`
542 if test x"${ac_cv_c_tkconfig}" = x ; then
543 TKCONFIG="# no Tk configs found"
544 AC_MSG_WARN(Can't find Tk configuration definitions)
547 TKCONFIG=${ac_cv_c_tkconfig}/tkConfig.sh
548 AC_MSG_RESULT(found $TKCONFIG)
554 # Defined as a separate macro so we don't have to cache the values
555 # from PATH_TKCONFIG (because this can also be cached).
556 AC_DEFUN(CY_AC_LOAD_TKCONFIG, [
557 if test -f "$TKCONFIG" ; then
562 dnl not actually used, don't export to save symbols
563 dnl AC_SUBST(TK_MAJOR_VERSION)
564 dnl AC_SUBST(TK_MINOR_VERSION)
568 dnl not used, don't export to save symbols
569 dnl AC_SUBST(TK_LIB_FILE)
571 dnl not used outside of configure
572 dnl AC_SUBST(TK_LIBS)
573 dnl not used, don't export to save symbols
574 dnl AC_SUBST(TK_PREFIX)
576 dnl not used, don't export to save symbols
577 dnl AC_SUBST(TK_EXEC_PREFIX)
579 AC_SUBST(TK_XINCLUDES)
582 # if Tk's build directory has been removed, TK_LIB_SPEC should
583 # be used instead of TK_BUILD_LIB_SPEC
585 # eval used to expand out TK_DBGX
586 eval "LIBS=\"$TK_BUILD_LIB_SPEC $TCL_BUILD_LIB_SPEC $TK_LIBS\""
587 AC_CHECK_FUNC(Tk_Init,[
588 AC_MSG_CHECKING([if Tk library build specification is valid])
591 TK_BUILD_LIB_SPEC=$TK_LIB_SPEC
592 # Can't pull the following CHECKING call out since it will be
593 # broken up by the CHECK_FUNC just above.
594 AC_MSG_CHECKING([if Tk library build specification is valid])
599 AC_SUBST(TK_BUILD_LIB_SPEC)
600 AC_SUBST(TK_LIB_SPEC)