]>
Commit | Line | Data |
---|---|---|
4e327047 | 1 | dnl written by Rob Savoye <[email protected]> for Cygnus Support |
047465fd TT |
2 | dnl major rewriting for Tcl 7.5 by Don Libes <[email protected]> |
3 | ||
fef1696f ILT |
4 | sinclude(../bfd/aclocal.m4) |
5 | ||
047465fd TT |
6 | dnl CY_AC_PATH_TCLCONFIG and CY_AC_LOAD_TCLCONFIG should be invoked |
7 | dnl (in that order) before any other TCL macros. Similarly for TK. | |
8 | ||
4e327047 TT |
9 | dnl CYGNUS LOCAL: This gets the right posix flag for gcc |
10 | AC_DEFUN(CY_AC_TCL_LYNX_POSIX, | |
11 | [AC_REQUIRE([AC_PROG_CC])AC_REQUIRE([AC_PROG_CPP]) | |
047465fd | 12 | AC_MSG_CHECKING([if running LynxOS]) |
4e327047 TT |
13 | AC_CACHE_VAL(ac_cv_os_lynx, |
14 | [AC_EGREP_CPP(yes, | |
15 | [/* | |
16 | * The old Lynx "cc" only defines "Lynx", but the newer one uses "__Lynx__" | |
17 | */ | |
18 | #if defined(__Lynx__) || defined(Lynx) | |
19 | yes | |
20 | #endif | |
21 | ], ac_cv_os_lynx=yes, ac_cv_os_lynx=no)]) | |
5436fc65 | 22 | # |
4e327047 TT |
23 | if test "$ac_cv_os_lynx" = "yes" ; then |
24 | AC_MSG_RESULT(yes) | |
25 | AC_DEFINE(LYNX) | |
26 | AC_MSG_CHECKING([whether -mposix or -X is available]) | |
27 | AC_CACHE_VAL(ac_cv_c_posix_flag, | |
28 | [AC_TRY_COMPILE(,[ | |
29 | /* | |
30 | * This flag varies depending on how old the compiler is. | |
31 | * -X is for the old "cc" and "gcc" (based on 1.42). | |
32 | * -mposix is for the new gcc (at least 2.5.8). | |
33 | */ | |
34 | #if defined(__GNUC__) && __GNUC__ >= 2 | |
35 | choke me | |
36 | #endif | |
37 | ], ac_cv_c_posix_flag=" -mposix", ac_cv_c_posix_flag=" -X")]) | |
38 | CC="$CC $ac_cv_c_posix_flag" | |
39 | AC_MSG_RESULT($ac_cv_c_posix_flag) | |
40 | else | |
41 | AC_MSG_RESULT(no) | |
42 | fi | |
43 | ]) | |
4bd9f70f | 44 | |
047465fd TT |
45 | # |
46 | # Sometimes the native compiler is a bogus stub for gcc or /usr/ucb/cc. This | |
47 | # makes configure think it's cross compiling. If --target wasn't used, then | |
48 | # we can't configure, so something is wrong. We don't use the cache | |
49 | # here cause if somebody fixes their compiler install, we want this to work. | |
50 | AC_DEFUN(CY_AC_C_WORKS, | |
51 | [# If we cannot compile and link a trivial program, we can't expect anything to work | |
52 | AC_MSG_CHECKING(whether the compiler ($CC) actually works) | |
53 | AC_TRY_COMPILE(, [/* don't need anything here */], | |
54 | c_compiles=yes, c_compiles=no) | |
55 | ||
56 | AC_TRY_LINK(, [/* don't need anything here */], | |
57 | c_links=yes, c_links=no) | |
58 | ||
59 | if test x"${c_compiles}" = x"no" ; then | |
60 | AC_MSG_ERROR(the native compiler is broken and won't compile.) | |
61 | fi | |
62 | ||
63 | if test x"${c_links}" = x"no" ; then | |
64 | AC_MSG_ERROR(the native compiler is broken and won't link.) | |
65 | fi | |
66 | AC_MSG_RESULT(yes) | |
67 | ]) | |
68 | ||
4e327047 TT |
69 | AC_DEFUN(CY_AC_PATH_TCLH, [ |
70 | # | |
71 | # Ok, lets find the tcl source trees so we can use the headers | |
72 | # Warning: transition of version 9 to 10 will break this algorithm | |
73 | # because 10 sorts before 9. We also look for just tcl. We have to | |
74 | # be careful that we don't match stuff like tclX by accident. | |
75 | # the alternative search directory is involked by --with-tclinclude | |
76 | # | |
8a19b35a | 77 | |
4e327047 | 78 | no_tcl=true |
8a19b35a | 79 | AC_MSG_CHECKING(for Tcl private headers. dir=${configdir}) |
4e327047 TT |
80 | AC_ARG_WITH(tclinclude, [ --with-tclinclude directory where tcl private headers are], with_tclinclude=${withval}) |
81 | AC_CACHE_VAL(ac_cv_c_tclh,[ | |
82 | # first check to see if --with-tclinclude was specified | |
83 | if test x"${with_tclinclude}" != x ; then | |
84 | if test -f ${with_tclinclude}/tclInt.h ; then | |
85 | ac_cv_c_tclh=`(cd ${with_tclinclude}; pwd)` | |
047465fd TT |
86 | elif test -f ${with_tclinclude}/generic/tclInt.h ; then |
87 | ac_cv_c_tclh=`(cd ${with_tclinclude}/generic; pwd)` | |
5436fc65 | 88 | else |
4e327047 | 89 | AC_MSG_ERROR([${with_tclinclude} directory doesn't contain private headers]) |
5436fc65 | 90 | fi |
4e327047 | 91 | fi |
047465fd TT |
92 | |
93 | # next check if it came with Tcl configuration file | |
94 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
95 | if test -f $ac_cv_c_tclconfig/../generic/tclInt.h ; then | |
96 | ac_cv_c_tclh=`(cd $ac_cv_c_tclconfig/..; pwd)` | |
97 | fi | |
98 | fi | |
99 | ||
4e327047 TT |
100 | # next check in private source directory |
101 | # | |
102 | # since ls returns lowest version numbers first, reverse its output | |
103 | if test x"${ac_cv_c_tclh}" = x ; then | |
104 | for i in \ | |
105 | ${srcdir}/../tcl \ | |
047465fd | 106 | `ls -dr ${srcdir}/../tcl[[7-9]]* 2>/dev/null` \ |
4e327047 | 107 | ${srcdir}/../../tcl \ |
047465fd | 108 | `ls -dr ${srcdir}/../../tcl[[7-9]]* 2>/dev/null` \ |
4e327047 | 109 | ${srcdir}/../../../tcl \ |
047465fd | 110 | `ls -dr ${srcdir}/../../../tcl[[7-9]]* 2>/dev/null ` ; do |
4e327047 | 111 | if test -f $i/generic/tclInt.h ; then |
047465fd | 112 | ac_cv_c_tclh=`(cd $i/generic; pwd)` |
4bd9f70f | 113 | break |
4e327047 TT |
114 | fi |
115 | done | |
116 | fi | |
117 | # finally check in a few common install locations | |
118 | # | |
119 | # since ls returns lowest version numbers first, reverse its output | |
120 | if test x"${ac_cv_c_tclh}" = x ; then | |
121 | for i in \ | |
047465fd TT |
122 | `ls -dr /usr/local/src/tcl[[7-9]]* 2>/dev/null` \ |
123 | `ls -dr /usr/local/lib/tcl[[7-9]]* 2>/dev/null` \ | |
4e327047 TT |
124 | /usr/local/src/tcl \ |
125 | /usr/local/lib/tcl \ | |
126 | ${prefix}/include ; do | |
047465fd TT |
127 | if test -f $i/generic/tclInt.h ; then |
128 | ac_cv_c_tclh=`(cd $i/generic; pwd)` | |
4e327047 TT |
129 | break |
130 | fi | |
131 | done | |
132 | fi | |
133 | # see if one is installed | |
134 | if test x"${ac_cv_c_tclh}" = x ; then | |
135 | AC_HEADER_CHECK(tclInt.h, ac_cv_c_tclh=installed, ac_cv_c_tclh="") | |
136 | fi | |
137 | ]) | |
138 | if test x"${ac_cv_c_tclh}" = x ; then | |
139 | TCLHDIR="# no Tcl private headers found" | |
140 | AC_MSG_ERROR([Can't find Tcl private headers]) | |
141 | fi | |
142 | if test x"${ac_cv_c_tclh}" != x ; then | |
143 | no_tcl="" | |
4bd9f70f | 144 | if test x"${ac_cv_c_tclh}" = x"installed" ; then |
4e327047 TT |
145 | AC_MSG_RESULT([is installed]) |
146 | TCLHDIR="" | |
147 | else | |
148 | AC_MSG_RESULT([found in ${ac_cv_c_tclh}]) | |
149 | # this hack is cause the TCLHDIR won't print if there is a "-I" in it. | |
150 | TCLHDIR="-I${ac_cv_c_tclh}" | |
5436fc65 C |
151 | fi |
152 | fi | |
4e327047 | 153 | |
4e327047 TT |
154 | AC_SUBST(TCLHDIR) |
155 | ]) | |
047465fd TT |
156 | |
157 | ||
158 | AC_DEFUN(CY_AC_PATH_TCLCONFIG, [ | |
5436fc65 | 159 | # |
047465fd | 160 | # Ok, lets find the tcl configuration |
5436fc65 | 161 | # First, look for one uninstalled. |
047465fd | 162 | # the alternative search directory is invoked by --with-tclconfig |
5436fc65 | 163 | # |
4e327047 | 164 | |
4e327047 | 165 | if test x"${no_tcl}" = x ; then |
047465fd | 166 | # we reset no_tcl in case something fails here |
4e327047 | 167 | no_tcl=true |
047465fd TT |
168 | AC_ARG_WITH(tclconfig, [ --with-tclconfig directory containing tcl configuration (tclConfig.sh)], |
169 | with_tclconfig=${withval}) | |
170 | AC_MSG_CHECKING([for Tcl configuration]) | |
171 | AC_CACHE_VAL(ac_cv_c_tclconfig,[ | |
172 | ||
173 | # First check to see if --with-tclconfig was specified. | |
174 | if test x"${with_tclconfig}" != x ; then | |
175 | if test -f "${with_tclconfig}/tclConfig.sh" ; then | |
176 | ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)` | |
4e327047 | 177 | else |
047465fd | 178 | AC_MSG_ERROR([${with_tclconfig} directory doesn't contain tclConfig.sh]) |
4e327047 | 179 | fi |
5436fc65 | 180 | fi |
047465fd TT |
181 | |
182 | # then check for a private Tcl installation | |
183 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
4e327047 TT |
184 | for i in \ |
185 | ../tcl \ | |
047465fd | 186 | `ls -dr ../tcl[[7-9]]* 2>/dev/null` \ |
4e327047 | 187 | ../../tcl \ |
047465fd | 188 | `ls -dr ../../tcl[[7-9]]* 2>/dev/null` \ |
4e327047 | 189 | ../../../tcl \ |
047465fd | 190 | `ls -dr ../../../tcl[[7-9]]* 2>/dev/null` ; do |
8a19b35a MH |
191 | if test -f "$i/${configdir}/tclConfig.sh" ; then |
192 | ac_cv_c_tclconfig=`(cd $i/${configdir}; pwd)` | |
4e327047 TT |
193 | break |
194 | fi | |
195 | done | |
5436fc65 | 196 | fi |
4e327047 | 197 | # check in a few common install locations |
047465fd | 198 | if test x"${ac_cv_c_tclconfig}" = x ; then |
4e327047 | 199 | for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do |
047465fd TT |
200 | if test -f "$i/tclConfig.sh" ; then |
201 | ac_cv_c_tclconfig=`(cd $i; pwd)` | |
4e327047 TT |
202 | break |
203 | fi | |
204 | done | |
5436fc65 | 205 | fi |
4e327047 | 206 | # check in a few other private locations |
047465fd | 207 | if test x"${ac_cv_c_tclconfig}" = x ; then |
4e327047 TT |
208 | for i in \ |
209 | ${srcdir}/../tcl \ | |
047465fd | 210 | `ls -dr ${srcdir}/../tcl[[7-9]]* 2>/dev/null` ; do |
8a19b35a MH |
211 | if test -f "$i/${configdir}/tclConfig.sh" ; then |
212 | ac_cv_c_tclconfig=`(cd $i/${configdir}; pwd)` | |
4e327047 TT |
213 | break |
214 | fi | |
215 | done | |
5436fc65 | 216 | fi |
4e327047 | 217 | ]) |
047465fd TT |
218 | if test x"${ac_cv_c_tclconfig}" = x ; then |
219 | TCLCONFIG="# no Tcl configs found" | |
220 | AC_MSG_WARN(Can't find Tcl configuration definitions) | |
4e327047 | 221 | else |
4e327047 | 222 | no_tcl= |
047465fd TT |
223 | TCLCONFIG=${ac_cv_c_tclconfig}/tclConfig.sh |
224 | AC_MSG_RESULT(found $TCLCONFIG) | |
4e327047 | 225 | fi |
5436fc65 | 226 | fi |
047465fd TT |
227 | ]) |
228 | ||
229 | # Defined as a separate macro so we don't have to cache the values | |
230 | # from PATH_TCLCONFIG (because this can also be cached). | |
231 | AC_DEFUN(CY_AC_LOAD_TCLCONFIG, [ | |
232 | . $TCLCONFIG | |
233 | ||
234 | AC_SUBST(TCL_VERSION) | |
235 | AC_SUBST(TCL_MAJOR_VERSION) | |
236 | AC_SUBST(TCL_MINOR_VERSION) | |
237 | AC_SUBST(TCL_CC) | |
238 | AC_SUBST(TCL_DEFS) | |
239 | ||
240 | dnl not used, don't export to save symbols | |
241 | dnl AC_SUBST(TCL_LIB_FILE) | |
242 | ||
243 | dnl don't export, not used outside of configure | |
244 | dnl AC_SUBST(TCL_LIBS) | |
245 | dnl not used, don't export to save symbols | |
246 | dnl AC_SUBST(TCL_PREFIX) | |
247 | ||
248 | dnl not used, don't export to save symbols | |
249 | dnl AC_SUBST(TCL_EXEC_PREFIX) | |
5436fc65 | 250 | |
047465fd TT |
251 | AC_SUBST(TCL_SHLIB_CFLAGS) |
252 | AC_SUBST(TCL_SHLIB_LD) | |
253 | dnl don't export, not used outside of configure | |
254 | AC_SUBST(TCL_SHLIB_LD_LIBS) | |
255 | AC_SUBST(TCL_SHLIB_SUFFIX) | |
256 | dnl not used, don't export to save symbols | |
257 | AC_SUBST(TCL_DL_LIBS) | |
258 | AC_SUBST(TCL_LD_FLAGS) | |
259 | dnl don't export, not used outside of configure | |
260 | AC_SUBST(TCL_LD_SEARCH_FLAGS) | |
261 | AC_SUBST(TCL_COMPAT_OBJS) | |
262 | AC_SUBST(TCL_RANLIB) | |
263 | AC_SUBST(TCL_BUILD_LIB_SPEC) | |
264 | AC_SUBST(TCL_LIB_SPEC) | |
265 | AC_SUBST(TCL_LIB_VERSIONS_OK) | |
266 | ||
267 | dnl not used, don't export to save symbols | |
268 | dnl AC_SUBST(TCL_SHARED_LIB_SUFFIX) | |
269 | ||
270 | dnl not used, don't export to save symbols | |
271 | dnl AC_SUBST(TCL_UNSHARED_LIB_SUFFIX) | |
5436fc65 | 272 | ]) |
047465fd TT |
273 | |
274 | # Warning: Tk definitions are very similar to Tcl definitions but | |
275 | # are not precisely the same. There are a couple of differences, | |
276 | # so don't do changes to Tcl thinking you can cut and paste it do | |
277 | # the Tk differences and later simply substitute "Tk" for "Tcl". | |
278 | # Known differences: | |
279 | # - Acceptable Tcl major version #s is 7-9 while Tk is 4-9 | |
280 | # - Searching for Tcl includes looking for tclInt.h, Tk looks for tk.h | |
281 | # - Computing major/minor versions is different because Tk depends on | |
282 | # headers to Tcl, Tk, and X. | |
283 | # - Symbols in tkConfig.sh are different than tclConfig.sh | |
284 | # - Acceptable for Tk to be missing but not Tcl. | |
285 | ||
4e327047 | 286 | AC_DEFUN(CY_AC_PATH_TKH, [ |
5436fc65 | 287 | # |
4e327047 TT |
288 | # Ok, lets find the tk source trees so we can use the headers |
289 | # If the directory (presumably symlink) named "tk" exists, use that one | |
290 | # in preference to any others. Same logic is used when choosing library | |
291 | # and again with Tcl. The search order is the best place to look first, then in | |
292 | # decreasing significance. The loop breaks if the trigger file is found. | |
293 | # Note the gross little conversion here of srcdir by cd'ing to the found | |
294 | # directory. This converts the path from a relative to an absolute, so | |
295 | # recursive cache variables for the path will work right. We check all | |
296 | # the possible paths in one loop rather than many seperate loops to speed | |
297 | # things up. | |
047465fd | 298 | # the alternative search directory is involked by --with-tkinclude |
5436fc65 | 299 | # |
4e327047 | 300 | no_tk=true |
047465fd TT |
301 | AC_MSG_CHECKING(for Tk private headers) |
302 | AC_ARG_WITH(tkinclude, [ --with-tkinclude directory where tk private headers are], with_tkinclude=${withval}) | |
4e327047 TT |
303 | AC_CACHE_VAL(ac_cv_c_tkh,[ |
304 | # first check to see if --with-tkinclude was specified | |
305 | if test x"${with_tkinclude}" != x ; then | |
306 | if test -f ${with_tkinclude}/tk.h ; then | |
307 | ac_cv_c_tkh=`(cd ${with_tkinclude}; pwd)` | |
047465fd TT |
308 | elif test -f ${with_tkinclude}/generic/tk.h ; then |
309 | ac_cv_c_tkh=`(cd ${with_tkinclude}/generic; pwd)` | |
5436fc65 | 310 | else |
4e327047 | 311 | AC_MSG_ERROR([${with_tkinclude} directory doesn't contain private headers]) |
5436fc65 | 312 | fi |
4e327047 | 313 | fi |
047465fd TT |
314 | |
315 | # next check if it came with Tk configuration file | |
316 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
317 | if test -f $ac_cv_c_tkconfig/../generic/tk.h ; then | |
318 | ac_cv_c_tkh=`(cd $ac_cv_c_tkconfig/..; pwd)` | |
319 | fi | |
320 | fi | |
321 | ||
4e327047 TT |
322 | # next check in private source directory |
323 | # | |
047465fd | 324 | # since ls returns lowest version numbers first, reverse its output |
4e327047 TT |
325 | if test x"${ac_cv_c_tkh}" = x ; then |
326 | for i in \ | |
327 | ${srcdir}/../tk \ | |
047465fd | 328 | `ls -dr ${srcdir}/../tk[[4-9]]* 2>/dev/null` \ |
4e327047 | 329 | ${srcdir}/../../tk \ |
047465fd | 330 | `ls -dr ${srcdir}/../../tk[[4-9]]* 2>/dev/null` \ |
4e327047 | 331 | ${srcdir}/../../../tk \ |
047465fd TT |
332 | `ls -dr ${srcdir}/../../../tk[[4-9]]* 2>/dev/null ` ; do |
333 | if test -f $i/generic/tk.h ; then | |
334 | ac_cv_c_tkh=`(cd $i/generic; pwd)` | |
4e327047 TT |
335 | break |
336 | fi | |
4e327047 TT |
337 | done |
338 | fi | |
339 | # finally check in a few common install locations | |
340 | # | |
047465fd | 341 | # since ls returns lowest version numbers first, reverse its output |
4e327047 TT |
342 | if test x"${ac_cv_c_tkh}" = x ; then |
343 | for i in \ | |
047465fd TT |
344 | `ls -dr /usr/local/src/tk[[4-9]]* 2>/dev/null` \ |
345 | `ls -dr /usr/local/lib/tk[[4-9]]* 2>/dev/null` \ | |
4e327047 TT |
346 | /usr/local/src/tk \ |
347 | /usr/local/lib/tk \ | |
348 | ${prefix}/include ; do | |
047465fd TT |
349 | if test -f $i/generic/tk.h ; then |
350 | ac_cv_c_tkh=`(cd $i/generic; pwd)` | |
4e327047 TT |
351 | break |
352 | fi | |
353 | done | |
354 | fi | |
355 | # see if one is installed | |
356 | if test x"${ac_cv_c_tkh}" = x ; then | |
047465fd | 357 | AC_HEADER_CHECK(tk.h, ac_cv_c_tkh=installed, ac_cv_c_tkh="") |
4e327047 TT |
358 | fi |
359 | ]) | |
360 | if test x"${ac_cv_c_tkh}" != x ; then | |
361 | no_tk="" | |
362 | if test x"${ac_cv_c_tkh}" = x"installed" ; then | |
363 | AC_MSG_RESULT([is installed]) | |
364 | TKHDIR="" | |
365 | else | |
047465fd | 366 | AC_MSG_RESULT([found in ${ac_cv_c_tkh}]) |
4e327047 TT |
367 | # this hack is cause the TKHDIR won't print if there is a "-I" in it. |
368 | TKHDIR="-I${ac_cv_c_tkh}" | |
5436fc65 C |
369 | fi |
370 | else | |
4e327047 TT |
371 | TKHDIR="# no Tk directory found" |
372 | AC_MSG_WARN([Can't find Tk private headers]) | |
373 | no_tk=true | |
5436fc65 C |
374 | fi |
375 | ||
4e327047 TT |
376 | AC_SUBST(TKHDIR) |
377 | ]) | |
047465fd TT |
378 | |
379 | ||
380 | AC_DEFUN(CY_AC_PATH_TKCONFIG, [ | |
5436fc65 | 381 | # |
047465fd TT |
382 | # Ok, lets find the tk configuration |
383 | # First, look for one uninstalled. | |
384 | # the alternative search directory is invoked by --with-tkconfig | |
5436fc65 | 385 | # |
4e327047 TT |
386 | |
387 | if test x"${no_tk}" = x ; then | |
047465fd TT |
388 | # we reset no_tk in case something fails here |
389 | no_tk=true | |
390 | AC_ARG_WITH(tkconfig, [ --with-tkconfig directory containing tk configuration (tkConfig.sh)], | |
391 | with_tkconfig=${withval}) | |
392 | AC_MSG_CHECKING([for Tk configuration]) | |
393 | AC_CACHE_VAL(ac_cv_c_tkconfig,[ | |
4e327047 | 394 | |
047465fd TT |
395 | # First check to see if --with-tkconfig was specified. |
396 | if test x"${with_tkconfig}" != x ; then | |
397 | if test -f "${with_tkconfig}/tkConfig.sh" ; then | |
398 | ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)` | |
4e327047 | 399 | else |
047465fd | 400 | AC_MSG_ERROR([${with_tkconfig} directory doesn't contain tkConfig.sh]) |
4e327047 | 401 | fi |
5436fc65 | 402 | fi |
047465fd | 403 | |
4e327047 | 404 | # then check for a private Tk library |
047465fd | 405 | if test x"${ac_cv_c_tkconfig}" = x ; then |
4e327047 TT |
406 | for i in \ |
407 | ../tk \ | |
047465fd | 408 | `ls -dr ../tk[[4-9]]* 2>/dev/null` \ |
4e327047 | 409 | ../../tk \ |
047465fd | 410 | `ls -dr ../../tk[[4-9]]* 2>/dev/null` \ |
4e327047 | 411 | ../../../tk \ |
047465fd | 412 | `ls -dr ../../../tk[[4-9]]* 2>/dev/null` ; do |
8a19b35a MH |
413 | if test -f "$i/${configdir}/tkConfig.sh" ; then |
414 | ac_cv_c_tkconfig=`(cd $i/${configdir}; pwd)` | |
4e327047 | 415 | break |
4e327047 TT |
416 | fi |
417 | done | |
418 | fi | |
047465fd TT |
419 | # check in a few common install locations |
420 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
4e327047 | 421 | for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do |
047465fd TT |
422 | if test -f "$i/tkConfig.sh" ; then |
423 | ac_cv_c_tkconfig=`(cd $i; pwd)` | |
4e327047 | 424 | break |
4e327047 TT |
425 | fi |
426 | done | |
427 | fi | |
428 | # check in a few other private locations | |
047465fd | 429 | if test x"${ac_cv_c_tkconfig}" = x ; then |
4e327047 TT |
430 | for i in \ |
431 | ${srcdir}/../tk \ | |
047465fd | 432 | `ls -dr ${srcdir}/../tk[[4-9]]* 2>/dev/null` ; do |
8a19b35a MH |
433 | if test -f "$i/${configdir}/tkConfig.sh" ; then |
434 | ac_cv_c_tkconfig=`(cd $i/${configdir}; pwd)` | |
4e327047 | 435 | break |
4e327047 TT |
436 | fi |
437 | done | |
438 | fi | |
4e327047 | 439 | ]) |
047465fd TT |
440 | if test x"${ac_cv_c_tkconfig}" = x ; then |
441 | TKCONFIG="# no Tk configs found" | |
442 | AC_MSG_WARN(Can't find Tk configuration definitions) | |
4e327047 | 443 | else |
4e327047 | 444 | no_tk= |
047465fd TT |
445 | TKCONFIG=${ac_cv_c_tkconfig}/tkConfig.sh |
446 | AC_MSG_RESULT(found $TKCONFIG) | |
5436fc65 | 447 | fi |
5436fc65 | 448 | fi |
047465fd | 449 | |
4e327047 | 450 | ]) |
047465fd TT |
451 | |
452 | # Defined as a separate macro so we don't have to cache the values | |
453 | # from PATH_TKCONFIG (because this can also be cached). | |
454 | AC_DEFUN(CY_AC_LOAD_TKCONFIG, [ | |
455 | if test -f "$TKCONFIG" ; then | |
456 | . $TKCONFIG | |
457 | fi | |
458 | ||
459 | AC_SUBST(TK_VERSION) | |
460 | dnl not actually used, don't export to save symbols | |
461 | dnl AC_SUBST(TK_MAJOR_VERSION) | |
462 | dnl AC_SUBST(TK_MINOR_VERSION) | |
463 | AC_SUBST(TK_DEFS) | |
464 | ||
465 | dnl not used, don't export to save symbols | |
466 | dnl AC_SUBST(TK_LIB_FILE) | |
467 | ||
468 | dnl not used outside of configure | |
469 | dnl AC_SUBST(TK_LIBS) | |
470 | dnl not used, don't export to save symbols | |
471 | dnl AC_SUBST(TK_PREFIX) | |
472 | ||
473 | dnl not used, don't export to save symbols | |
474 | dnl AC_SUBST(TK_EXEC_PREFIX) | |
475 | ||
476 | AC_SUBST(TK_XINCLUDES) | |
477 | AC_SUBST(TK_XLIBSW) | |
478 | AC_SUBST(TK_BUILD_LIB_SPEC) | |
479 | AC_SUBST(TK_LIB_SPEC) | |
4e327047 | 480 | ]) |
047465fd | 481 |