Mercurial > ecos
comparison acsupport/acinclude.m4 @ 345:3f4258400ba5
Fix host-side configury problems which can occur if you are not using
the system installation of Tcl
| author | bartv |
|---|---|
| date | Sun, 22 Sep 2002 19:19:28 +0000 |
| parents | c0ffaecb376e |
| children | d82de0ee8e07 |
comparison
equal
deleted
inserted
replaced
| 344:2ac3cfd6ed44 | 345:3f4258400ba5 |
|---|---|
| 403 | 403 |
| 404 ecos_tcl_version="" | 404 ecos_tcl_version="" |
| 405 ecos_tcl_incdir="" | 405 ecos_tcl_incdir="" |
| 406 ecos_tcl_libdir="" | 406 ecos_tcl_libdir="" |
| 407 ecos_tk_libs="" | 407 ecos_tk_libs="" |
| 408 ecos_tk_libdir="" | |
| 408 | 409 |
| 409 dnl Look for the version of Tcl. If none is specified, default to | 410 dnl Look for the version of Tcl. If none is specified, default to |
| 410 dnl 8.0 under VC++ and cygwin, nothing under Unix. A version has to be | 411 dnl 8.0 under VC++ and cygwin, nothing under Unix. A version has to be |
| 411 dnl specified under NT because there is no symbolic link from libtcl.a | 412 dnl specified under NT because there is no symbolic link from libtcl.a |
| 412 dnl to whatever happens to be the most recent installed version. | 413 dnl to whatever happens to be the most recent installed version. |
| 499 AC_FIND_FILE("tclConfig.sh", ${possibles}, ecos_tcl_libdir) | 500 AC_FIND_FILE("tclConfig.sh", ${possibles}, ecos_tcl_libdir) |
| 500 if test \! -r "${ecos_tcl_libdir}/tclConfig.sh" ; then | 501 if test \! -r "${ecos_tcl_libdir}/tclConfig.sh" ; then |
| 501 AC_MSG_ERROR(unable to locate Tcl config file tclConfig.sh) | 502 AC_MSG_ERROR(unable to locate Tcl config file tclConfig.sh) |
| 502 else | 503 else |
| 503 . ${ecos_tcl_libdir}/tclConfig.sh | 504 . ${ecos_tcl_libdir}/tclConfig.sh |
| 505 dnl Arguably if ecos_tcl_version is not set then it should be | |
| 506 dnl here using TCL_VERSION, tying executables to a specific | |
| 507 dnl release. That avoids problems if the system has multiple | |
| 508 dnl Tcl installations, e.g. the system install plus a more | |
| 509 dnl recent private install. However it would introduce a | |
| 510 dnl problem if the system install gets upgraded, executables | |
| 511 dnl would still try to use the old version and would need | |
| 512 dnl to be rebuilt. | |
| 513 dnl | |
| 514 dnl For now, do not set ecos_tcl_version automatically. The | |
| 515 dnl user can override this. | |
| 504 ecos_LIBS="${ecos_LIBS} -ltcl${ecos_tcl_version} ${TCL_LIBS}" | 516 ecos_LIBS="${ecos_LIBS} -ltcl${ecos_tcl_version} ${TCL_LIBS}" |
| 517 ecos_LDADD="${ecos_LDADD} -L${ecos_tcl_libdir}" | |
| 505 fi | 518 fi |
| 506 | 519 |
| 507 possible_tk_libdir=`echo ${ecos_tcl_libdir} | sed -e 's,tcl,tk,'` | 520 possible_tk_libdir=`echo ${ecos_tcl_libdir} | sed -e 's,tcl,tk,'` |
| 508 possibles="${ecos_tcl_libdir} ${possible_tk_libdir}" | 521 possibles="${ecos_tcl_libdir} ${possible_tk_libdir}" |
| 509 AC_FIND_FILE("tkConfig.sh", ${possibles}, ecos_tk_libdir) | 522 AC_FIND_FILE("tkConfig.sh", ${possibles}, ecos_tk_libdir) |
| 510 if test \! -r "${ecos_tk_libdir}/tkConfig.sh" ; then | 523 if test \! -r "${ecos_tk_libdir}/tkConfig.sh" ; then |
| 511 AC_MSG_ERROR(unable to locate Tk config file tkConfig.sh) | 524 AC_MSG_ERROR(unable to locate Tk config file tkConfig.sh) |
| 512 else | 525 else |
| 513 . ${ecos_tk_libdir}/tkConfig.sh | 526 . ${ecos_tk_libdir}/tkConfig.sh |
| 514 ecos_tk_libs="-ltk${ecos_tcl_version} ${TK_LIBS}" | 527 ecos_tk_libs="-L${ecos_tk_libdir} -ltk${ecos_tcl_version} ${TK_LIBS}" |
| 515 dnl Remove any library duplicates. It is not quite clear why, | 528 dnl Remove any library duplicates. It is not quite clear why, |
| 516 dnl but they seem to cause problems. | 529 dnl but they seem to cause problems. |
| 517 for lib in ${TCL_LIBS} ; do | 530 for lib in ${TCL_LIBS} ; do |
| 518 ecos_tk_libs=`echo ${ecos_tk_libs} | sed -e "s!${lib}!!"` | 531 ecos_tk_libs=`echo ${ecos_tk_libs} | sed -e "s!${lib}!!"` |
| 519 done | 532 done |
