OSDN Git Service

touched all sources to ease next import
[pf3gnuchains/sourceware.git] / itcl / tcl.m4
1 # tcl.m4 --
2 #
3 #       This file provides a set of autoconf macros to help TEA-enable
4 #       a Tcl extension.
5 #
6 # Copyright (c) 1999 Scriptics Corporation.
7 #
8 # See the file "license.terms" for information on usage and redistribution
9 # of this file, and for a DISCLAIMER OF ALL WARRANTIES.
10
11 #------------------------------------------------------------------------
12 # SC_PATH_TCLCONFIG --
13 #
14 #       Locate the tclConfig.sh file and perform a sanity check on
15 #       the Tcl compile flags
16 #
17 # Arguments:
18 #       none
19 #
20 # Results:
21 #
22 #       Adds the following arguments to configure:
23 #               --with-tcl=...
24 #
25 #       Defines the following vars:
26 #               TCL_BIN_DIR     Full path to the directory containing
27 #                               the tclConfig.sh file
28 #------------------------------------------------------------------------
29
30 AC_DEFUN(SC_PATH_TCLCONFIG, [
31     #
32     # Ok, lets find the tcl configuration
33     # First, look for one uninstalled.
34     # the alternative search directory is invoked by --with-tcl
35     #
36
37     if test x"${no_tcl}" = x ; then
38         # we reset no_tcl in case something fails here
39         no_tcl=true
40         AC_ARG_WITH(tcl, [  --with-tcl              directory containing tcl configuration (tclConfig.sh)], with_tclconfig=${withval})
41         AC_MSG_CHECKING([for Tcl configuration])
42         AC_CACHE_VAL(ac_cv_c_tclconfig,[
43
44             # First check to see if --with-tcl was specified.
45             if test x"${with_tclconfig}" != x ; then
46                 if test -f "${with_tclconfig}/tclConfig.sh" ; then
47                     ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
48                 else
49                     AC_MSG_ERROR([${with_tclconfig} directory doesn't contain tclConfig.sh])
50                 fi
51             fi
52
53             # then check for a private Tcl installation
54             if test x"${ac_cv_c_tclconfig}" = x ; then
55                 for i in \
56                         ../tcl \
57                         `ls -dr ../tcl[[8-9]].[[0-9]]* 2>/dev/null` \
58                         ../../tcl \
59                         `ls -dr ../../tcl[[8-9]].[[0-9]]* 2>/dev/null` \
60                         ../../../tcl \
61                         `ls -dr ../../../tcl[[8-9]].[[0-9]]* 2>/dev/null` ; do
62                     if test -f "$i/unix/tclConfig.sh" ; then
63                         ac_cv_c_tclconfig=`(cd $i/unix; pwd)`
64                         break
65                     fi
66                     if test -f "$i/win/tclConfig.sh" ; then
67                         ac_cv_c_tclconfig=`(cd $i/win; pwd)`
68                         break
69                     fi
70                 done
71             fi
72
73             # check in a few common install locations
74             if test x"${ac_cv_c_tclconfig}" = x ; then
75                 for i in `ls -d ${prefix}/lib 2>/dev/null` \
76                         `ls -d /usr/local/lib 2>/dev/null` ; do
77                     if test -f "$i/tclConfig.sh" ; then
78                         ac_cv_c_tclconfig=`(cd $i; pwd)`
79                         break
80                     fi
81                 done
82             fi
83
84             # check in a few other private locations
85             if test x"${ac_cv_c_tclconfig}" = x ; then
86                 for i in \
87                         ${srcdir}/../tcl \
88                         `ls -dr ${srcdir}/../tcl[[8-9]].[[0-9]]* 2>/dev/null` ; do
89                     if test -f "$i/unix/tclConfig.sh" ; then
90                     ac_cv_c_tclconfig=`(cd $i/unix; pwd)`
91                     break
92                     fi
93                     if test -f "$i/win/tclConfig.sh" ; then
94                     ac_cv_c_tclconfig=`(cd $i/win; pwd)`
95                     break
96                     fi
97                 done
98             fi
99         ])
100
101         if test x"${ac_cv_c_tclconfig}" = x ; then
102             TCL_BIN_DIR="# no Tcl configs found"
103             AC_MSG_ERROR(Can't find Tcl configuration definitions)
104             exit 0
105         else
106             no_tcl=
107             TCL_BIN_DIR=${ac_cv_c_tclconfig}
108             AC_MSG_RESULT(found $TCL_BIN_DIR/tclConfig.sh)
109         fi
110     fi
111 ])
112
113 #------------------------------------------------------------------------
114 # SC_PATH_TKCONFIG --
115 #
116 #       Locate the tkConfig.sh file
117 #
118 # Arguments:
119 #       none
120 #
121 # Results:
122 #
123 #       Adds the following arguments to configure:
124 #               --with-tk=...
125 #
126 #       Defines the following vars:
127 #               TK_BIN_DIR      Full path to the directory containing
128 #                               the tkConfig.sh file
129 #------------------------------------------------------------------------
130
131 AC_DEFUN(SC_PATH_TKCONFIG, [
132     #
133     # Ok, lets find the tk configuration
134     # First, look for one uninstalled.
135     # the alternative search directory is invoked by --with-tk
136     #
137
138     if test x"${no_tk}" = x ; then
139         # we reset no_tk in case something fails here
140         no_tk=true
141         AC_ARG_WITH(tk, [  --with-tk               directory containing tk configuration (tkConfig.sh)], with_tkconfig=${withval})
142         AC_MSG_CHECKING([for Tk configuration])
143         AC_CACHE_VAL(ac_cv_c_tkconfig,[
144
145             # First check to see if --with-tkconfig was specified.
146             if test x"${with_tkconfig}" != x ; then
147                 if test -f "${with_tkconfig}/tkConfig.sh" ; then
148                     ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
149                 else
150                     AC_MSG_ERROR([${with_tkconfig} directory doesn't contain tkConfig.sh])
151                 fi
152             fi
153
154             # then check for a private Tk library
155             if test x"${ac_cv_c_tkconfig}" = x ; then
156                 for i in \
157                         ../tk \
158                         `ls -dr ../tk[[8-9]].[[0-9]]* 2>/dev/null` \
159                         ../../tk \
160                         `ls -dr ../../tk[[8-9]].[[0-9]]* 2>/dev/null` \
161                         ../../../tk \
162                         `ls -dr ../../../tk[[8-9]].[[0-9]]* 2>/dev/null` ; do
163                     if test -f "$i/unix/tkConfig.sh" ; then
164                         ac_cv_c_tkconfig=`(cd $i/unix; pwd)`
165                         break
166                     fi
167                     if test -f "$i/win/tkConfig.sh" ; then
168                         ac_cv_c_tkconfig=`(cd $i/win; pwd)`
169                         break
170                     fi
171                 done
172             fi
173             # check in a few common install locations
174             if test x"${ac_cv_c_tkconfig}" = x ; then
175                 for i in `ls -d ${prefix}/lib 2>/dev/null` \
176                         `ls -d /usr/local/lib 2>/dev/null` ; do
177                     if test -f "$i/tkConfig.sh" ; then
178                         ac_cv_c_tkconfig=`(cd $i; pwd)`
179                         break
180                     fi
181                 done
182             fi
183             # check in a few other private locations
184             if test x"${ac_cv_c_tkconfig}" = x ; then
185                 for i in \
186                         ${srcdir}/../tk \
187                         `ls -dr ${srcdir}/../tk[[8-9]].[[0-9]]* 2>/dev/null` ; do
188                     if test -f "$i/unix/tkConfig.sh" ; then
189                         ac_cv_c_tkconfig=`(cd $i/unix; pwd)`
190                         break
191                     fi
192                     if test -f "$i/win/tkConfig.sh" ; then
193                         ac_cv_c_tkconfig=`(cd $i/win; pwd)`
194                         break
195                     fi
196                 done
197             fi
198         ])
199         if test x"${ac_cv_c_tkconfig}" = x ; then
200             TK_BIN_DIR="# no Tk configs found"
201             AC_MSG_ERROR(Can't find Tk configuration definitions)
202             exit 0
203         else
204             no_tk=
205             TK_BIN_DIR=${ac_cv_c_tkconfig}
206             AC_MSG_RESULT(found $TK_BIN_DIR/tkConfig.sh)
207         fi
208     fi
209
210 ])
211
212 #------------------------------------------------------------------------
213 # SC_LOAD_TCLCONFIG --
214 #
215 #       Load the tclConfig.sh file
216 #
217 # Arguments:
218 #       
219 #       Requires the following vars to be set:
220 #               TCL_BIN_DIR
221 #
222 # Results:
223 #
224 #       Subst the following vars:
225 #               TCL_BIN_DIR
226 #               TCL_SRC_DIR
227 #               TCL_LIB_FILE
228 #
229 #------------------------------------------------------------------------
230
231 AC_DEFUN(SC_LOAD_TCLCONFIG, [
232     AC_MSG_CHECKING([for existence of $TCL_BIN_DIR/tclConfig.sh])
233
234     if test -f "$TCL_BIN_DIR/tclConfig.sh" ; then
235         AC_MSG_RESULT([loading])
236         . $TCL_BIN_DIR/tclConfig.sh
237     else
238         AC_MSG_RESULT([file not found])
239     fi
240
241     #
242     # The eval is required to do the TCL_DBGX substitution in the
243     # TCL_LIB_FILE variable
244     #
245
246     eval TCL_LIB_FILE=${TCL_LIB_FILE}
247     eval TCL_LIB_FLAG=${TCL_LIB_FLAG}
248
249     AC_SUBST(TCL_DBGX)
250     AC_SUBST(TCL_BIN_DIR)
251     AC_SUBST(TCL_SRC_DIR)
252     AC_SUBST(TCL_LIB_FILE)
253     AC_SUBST(TCL_LIBS)
254     AC_SUBST(TCL_DEFS)
255     AC_SUBST(TCL_SHLIB_LD_LIBS)
256     AC_SUBST(TCL_EXTRA_CFLAGS)
257     AC_SUBST(TCL_LD_FLAGS)
258     AC_SUBST(TCL_LIB_FILE)
259     AC_SUBST(TCL_STUB_LIB_FILE)
260     AC_SUBST(TCL_LIB_SPEC)
261     AC_SUBST(TCL_BUILD_LIB_SPEC)
262     AC_SUBST(TCL_STUB_LIB_SPEC)
263     AC_SUBST(TCL_BUILD_STUB_LIB_SPEC)
264 ])
265
266 #------------------------------------------------------------------------
267 # SC_LOAD_TKCONFIG --
268 #
269 #       Load the tkConfig.sh file
270 #
271 # Arguments:
272 #       
273 #       Requires the following vars to be set:
274 #               TK_BIN_DIR
275 #
276 # Results:
277 #
278 #       Sets the following vars that should be in tkConfig.sh:
279 #               TK_BIN_DIR
280 #------------------------------------------------------------------------
281
282 AC_DEFUN(SC_LOAD_TKCONFIG, [
283     AC_MSG_CHECKING([for existence of $TK_BIN_DIR/tkConfig.sh])
284
285     if test -f "$TK_BIN_DIR/tkConfig.sh" ; then
286         AC_MSG_RESULT([loading])
287         . $TK_BIN_DIR/tkConfig.sh
288     else
289         AC_MSG_RESULT([could not find $TK_BIN_DIR/tkConfig.sh])
290     fi
291
292     AC_SUBST(TK_BIN_DIR)
293     AC_SUBST(TK_SRC_DIR)
294     AC_SUBST(TK_LIB_FILE)
295     AC_SUBST(TK_XINCLUDES)
296 ])
297
298 #------------------------------------------------------------------------
299 # SC_ENABLE_SHARED --
300 #
301 #       Allows the building of shared libraries
302 #
303 # Arguments:
304 #       none
305 #       
306 # Results:
307 #
308 #       Adds the following arguments to configure:
309 #               --enable-shared=yes|no
310 #
311 #       Defines the following vars:
312 #               STATIC_BUILD    Used for building import/export libraries
313 #                               on Windows.
314 #
315 #       Sets the following vars:
316 #               SHARED_BUILD    Value of 1 or 0
317 #------------------------------------------------------------------------
318
319 AC_DEFUN(SC_ENABLE_SHARED, [
320     AC_MSG_CHECKING([how to build libraries])
321     AC_ARG_ENABLE(shared,
322         [  --enable-shared         build and link with shared libraries [--enable-shared]],
323         [tcl_ok=$enableval], [tcl_ok=no])
324
325 # CYGNUS LOCAL
326     case "${host}" in
327         *mingw32* | *windows32*)
328             # Default to shared build for Windows
329             if test "${enable_shared+set}" != set; then
330                 tcl_ok=yes
331             fi
332         ;;
333     esac
334 # END CYGNUS LOCAL
335
336     if test "$tcl_ok" = "yes" ; then
337         AC_MSG_RESULT([shared])
338         SHARED_BUILD=1
339     else
340         AC_MSG_RESULT([static])
341         SHARED_BUILD=0
342         AC_DEFINE(STATIC_BUILD)
343     fi
344 ])
345
346 #------------------------------------------------------------------------
347 # SC_ENABLE_THREADS --
348 #
349 #       Specify if thread support should be enabled
350 #
351 # Arguments:
352 #       none
353 #       
354 # Results:
355 #
356 #       Adds the following arguments to configure:
357 #               --enable-threads
358 #
359 #       Sets the following vars:
360 #               THREADS_LIBS    Thread library(s)
361 #
362 #       Defines the following vars:
363 #               TCL_THREADS
364 #               _REENTRANT
365 #
366 #------------------------------------------------------------------------
367
368 AC_DEFUN(SC_ENABLE_THREADS, [
369     AC_MSG_CHECKING(for building with threads)
370     AC_ARG_ENABLE(threads, [  --enable-threads        build with threads],
371         [tcl_ok=$enableval], [tcl_ok=no])
372
373     if test "$tcl_ok" = "yes"; then
374         TCL_THREADS=1
375         AC_DEFINE(TCL_THREADS)
376         AC_DEFINE(_REENTRANT)
377
378         case "${host}" in
379             *mingw32* | *windows32*)
380                     AC_MSG_RESULT(yes)
381                 ;;
382             *)
383                 AC_CHECK_LIB(pthread,pthread_mutex_init,tcl_ok=yes,tcl_ok=no)
384                 if test "$tcl_ok" = "yes"; then
385                     # The space is needed
386                     THREADS_LIBS=" -lpthread"
387                     AC_MSG_RESULT(yes)
388                 else
389                     TCL_THREADS=0
390                     AC_MSG_RESULT(no)
391                     AC_MSG_WARN("Don t know how to find pthread lib on your system - you must disable thread support or edit the LIBS in the Makefile...")
392                 fi
393                 ;;
394         esac
395     else
396         TCL_THREADS=0
397         AC_MSG_RESULT(no (default))
398     fi
399
400 ])
401
402 #------------------------------------------------------------------------
403 # SC_ENABLE_SYMBOLS --
404 #
405 #       Specify if debugging symbols should be used
406 #
407 # Arguments:
408 #       none
409 #       
410 #       Requires the following vars to be set:
411 #               CFLAGS_DEBUG
412 #               CFLAGS_OPTIMIZE
413 #               LDFLAGS_DEBUG
414 #               LDFLAGS_OPTIMIZE
415 #       
416 # Results:
417 #
418 #       Adds the following arguments to configure:
419 #               --enable-symbols
420 #
421 #       Defines the following vars:
422 #               CFLAGS_DEFAULT  Sets to CFLAGS_DEBUG if true
423 #                               Sets to CFLAGS_OPTIMIZE if false
424 #               LDFLAGS_DEFAULT Sets to LDFLAGS_DEBUG if true
425 #                               Sets to LDFLAGS_OPTIMIZE if false
426 #               DBGX            Debug library extension
427 #
428 #------------------------------------------------------------------------
429
430 AC_DEFUN(SC_ENABLE_SYMBOLS, [
431     case "${host}" in
432         *mingw32* | *windows32*)
433             tcl_dbgx=d
434         ;;
435         *)
436             tcl_dbgx=g
437         ;;
438     esac
439
440     AC_MSG_CHECKING([for build with symbols])
441     AC_ARG_ENABLE(symbols, [  --enable-symbols        build with debugging symbols [--disable-symbols]],    [tcl_ok=$enableval], [tcl_ok=no])
442     if test "$tcl_ok" = "yes"; then
443         CFLAGS_DEFAULT="${CFLAGS_DEBUG}"
444         LDFLAGS_DEFAULT="${LDFLAGS_DEBUG}"
445         DBGX=${tcl_dbgx}
446         TCL_DBGX=${tcl_dbgx}
447         AC_MSG_RESULT([yes])
448     else
449         CFLAGS_DEFAULT="${CFLAGS_OPTIMIZE}"
450         LDFLAGS_DEFAULT="${LDFLAGS_OPTIMIZE}"
451         DBGX=""
452         TCL_DBGX=""
453         AC_MSG_RESULT([no])
454     fi
455
456     AC_SUBST(TCL_DBGX)
457     AC_SUBST(CFLAGS_DEFAULT)
458     AC_SUBST(LDFLAGS_DEFAULT)
459 ])
460
461 #------------------------------------------------------------------------
462 # SC_MAKE_LIB --
463 #
464 #       Generate a line that can be used to build a shared/unshared library
465 #       in a platform independent manner.
466 #
467 # Arguments:
468 #       none
469 #
470 #       Requires:
471 #
472 # Results:
473 #
474 #       Defines the following vars:
475 #               MAKE_LIB        Makefile rule for building a library
476 #               MAKE_SHARED_LIB Makefile rule for building a shared library
477 #               MAKE_UNSHARED_LIB       Makefile rule for building a static
478 #                               library
479 #------------------------------------------------------------------------
480
481 AC_DEFUN(SC_MAKE_LIB, [
482     case "${host}" in
483         *mingw32* | *windows32*)
484             if test "${CC}" = "cl"; then
485                 MAKE_STATIC_LIB="\${STLIB_LD} -out:\[$]@ \$(\[$]@_OBJECTS) "
486                 MAKE_SHARED_LIB="\${SHLIB_LD} \${SHLIB_LDFLAGS} \${SHLIB_LD_LIBS} \$(LDFLAGS) -out:\[$]@ \$(\[$]@_OBJECTS) "
487             else
488                 MAKE_STATIC_LIB="\${STLIB_LD} \[$]@ \$(\[$]@_OBJECTS) "
489                 POST_MAKE_STATIC_LIB="\${RANLIB} \[$]@"
490                 MAKE_SHARED_LIB="\${SHLIB_LD} -o \[$]@ \$(\[$]@_OBJECTS) \${SHLIB_LDFLAGS} \$(LDFLAGS) \${SHLIB_LD_LIBS} -Wl,--out-implib,\$(patsubst %.dll,lib%.a,\[$]@)"
491             fi
492             ;;
493         *)
494             MAKE_STATIC_LIB="\${STLIB_LD} \[$]@ \$(\[$]@_OBJECTS)"
495             POST_MAKE_STATIC_LIB="\${RANLIB} \[$]@"
496             MAKE_SHARED_LIB="\${SHLIB_LD} -o \[$]@ \$(\[$]@_OBJECTS) \${SHLIB_LDFLAGS} \${SHLIB_LD_LIBS}"
497             ;;
498     esac
499
500     if test "${SHARED_BUILD}" = "1" ; then
501         MAKE_LIB=${MAKE_SHARED_LIB}
502     else
503         MAKE_LIB=${MAKE_STATIC_LIB}
504         POST_MAKE_LIB=${POST_MAKE_STATIC_LIB}
505     fi
506
507     AC_SUBST(MAKE_LIB)
508     AC_SUBST(MAKE_SHARED_LIB)
509     AC_SUBST(MAKE_STATIC_LIB)
510     AC_SUBST(POST_MAKE_LIB)
511     AC_SUBST(POST_MAKE_STATIC_LIB)
512 ])
513
514 #------------------------------------------------------------------------
515 # SC_PRIVATE_TCL_HEADERS --
516 #
517 #       Locate the private Tcl include files
518 #
519 # Arguments:
520 #
521 #       Requires:
522 #               TCL_SRC_DIR     Assumes that SC_LOAD_TCLCONFIG has
523 #                                already been called.
524 #
525 # Results:
526 #
527 #       Substs the following vars:
528 #               TCL_TOP_DIR_NATIVE
529 #               TCL_GENERIC_DIR_NATIVE
530 #               TCL_UNIX_DIR_NATIVE
531 #               TCL_WIN_DIR_NATIVE
532 #               TCL_BMAP_DIR_NATIVE
533 #               TCL_TOOL_DIR_NATIVE
534 #               TCL_PLATFORM_DIR_NATIVE
535 #               TCL_BIN_DIR_NATIVE
536 #               TCL_INCLUDES
537 #------------------------------------------------------------------------
538
539 AC_DEFUN(SC_PRIVATE_TCL_HEADERS, [
540     AC_MSG_CHECKING(for Tcl private include files)
541
542     case "${host}" in
543         *mingw32* | *windows32*)
544             TCL_TOP_DIR_NATIVE=\"`${CYGPATH} ${TCL_SRC_DIR}`\"
545             TCL_GENERIC_DIR_NATIVE=\"`${CYGPATH} ${TCL_SRC_DIR}/generic`\"
546             TCL_UNIX_DIR_NATIVE=\"`${CYGPATH} ${TCL_SRC_DIR}/unix`\"
547             TCL_WIN_DIR_NATIVE=\"`${CYGPATH} ${TCL_SRC_DIR}/win`\"
548             TCL_BMAP_DIR_NATIVE=\"`${CYGPATH} ${TCL_SRC_DIR}/bitmaps`\"
549             TCL_TOOL_DIR_NATIVE=\"`${CYGPATH} ${TCL_SRC_DIR}/tools`\"
550             TCL_COMPAT_DIR_NATIVE=\"`${CYGPATH} ${TCL_SRC_DIR}/compat`\"
551             TCL_PLATFORM_DIR_NATIVE=${TCL_WIN_DIR_NATIVE}
552         ;;
553         *)
554             TCL_TOP_DIR_NATIVE='$(TCL_SRC_DIR)'
555             TCL_GENERIC_DIR_NATIVE='$(TCL_TOP_DIR_NATIVE)/generic'
556             TCL_UNIX_DIR_NATIVE='$(TCL_TOP_DIR_NATIVE)/unix'
557             TCL_WIN_DIR_NATIVE='$(TCL_TOP_DIR_NATIVE)/win'
558             TCL_BMAP_DIR_NATIVE='$(TCL_TOP_DIR_NATIVE)/bitmaps'
559             TCL_TOOL_DIR_NATIVE='$(TCL_TOP_DIR_NATIVE)/tools'
560             TCL_COMPAT_DIR_NATIVE='$(TCL_TOP_DIR_NATIVE)/compat'
561             TCL_PLATFORM_DIR_NATIVE=${TCL_UNIX_DIR_NATIVE}
562         ;;
563     esac
564
565     AC_SUBST(TCL_TOP_DIR_NATIVE)
566     AC_SUBST(TCL_GENERIC_DIR_NATIVE)
567     AC_SUBST(TCL_UNIX_DIR_NATIVE)
568     AC_SUBST(TCL_WIN_DIR_NATIVE)
569     AC_SUBST(TCL_BMAP_DIR_NATIVE)
570     AC_SUBST(TCL_TOOL_DIR_NATIVE)
571     AC_SUBST(TCL_PLATFORM_DIR_NATIVE)
572
573     TCL_INCLUDES="-I${TCL_GENERIC_DIR_NATIVE} -I${TCL_PLATFORM_DIR_NATIVE}"
574     AC_SUBST(TCL_INCLUDES)
575     AC_MSG_RESULT(Using srcdir found in tclConfig.sh: ${TCL_SRC_DIR})
576 ])
577
578 #------------------------------------------------------------------------
579 # SC_PRIVATE_TK_HEADERS --
580 #
581 #       Locate the private Tk include files
582 #
583 # Arguments:
584 #
585 #       Requires:
586 #               TK_SRC_DIR      Assumes that SC_LOAD_TKCONFIG has
587 #                                already been called.
588 #
589 # Results:
590 #
591 #       Substs the following vars:
592 #               TK_INCLUDES
593 #------------------------------------------------------------------------
594
595 AC_DEFUN(SC_PRIVATE_TK_HEADERS, [
596     AC_MSG_CHECKING(for Tk private include files)
597
598     case "${host}" in
599         *mingw32* | *windows32*)
600             TK_UNIX_DIR_NATIVE=\"`${CYGPATH} ${TK_SRC_DIR}/unix`\"
601             TK_WIN_DIR_NATIVE=\"`${CYGPATH} ${TK_SRC_DIR}/win`\"
602             TK_GENERIC_DIR_NATIVE=\"`${CYGPATH} ${TK_SRC_DIR}/generic`\"
603             TK_XLIB_DIR_NATIVE=\"`${CYGPATH} ${TK_SRC_DIR}/xlib`\"
604             TK_PLATFORM_DIR_NATIVE=${TK_WIN_DIR_NATIVE}
605
606             TK_INCLUDES="-I${TK_GENERIC_DIR_NATIVE} -I${TK_PLATFORM_DIR_NATIVE} -I${TK_XLIB_DIR_NATIVE}"
607         ;;
608         *)
609             TK_GENERIC_DIR_NATIVE='$(TK_TOP_DIR_NATIVE)/generic'
610             TK_UNIX_DIR_NATIVE='$(TK_TOP_DIR_NATIVE)/unix'
611             TK_WIN_DIR_NATIVE='$(TK_TOP_DIR_NATIVE)/win'
612             TK_PLATFORM_DIR_NATIVE=${TK_UNIX_DIR_NATIVE}
613
614             TK_INCLUDES="-I${TK_GENERIC_DIR_NATIVE} -I${TK_PLATFORM_DIR_NATIVE}"
615         ;;
616     esac
617
618     AC_SUBST(TK_UNIX_DIR_NATIVE)
619     AC_SUBST(TK_WIN_DIR_NATIVE)
620     AC_SUBST(TK_GENERIC_DIR_NATIVE)
621     AC_SUBST(TK_XLIB_DIR_NATIVE)
622     AC_SUBST(TK_PLATFORM_DIR_NATIVE)
623
624     AC_SUBST(TK_INCLUDES)
625     AC_MSG_RESULT(Using srcdir found in tkConfig.sh)
626 ])