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