Please check the GNU Autoconf Macro Archive for Updates
AC-Archive
Autoconf Macro Archive

ac-archive.sf.net: - Project CVS - Download
Macro Index
- AM Support
- C++ Support
- C Support
- Fortran Support
- Java Support
- Cross Compilation
- Installed Packages
- Miscellaneous
- LaTeX Support
- Uncategorized
- archive macros
- adl's macros
- bkorb's macros
- guidod's macros
- latex's macros
- other's macros
- rleigh's macros
- obsoleted macros
- released macros
- search index

Documentation
- Contribute!
- History
- acincludedir m4
- acinclude (tool)
- macro howto
- ax tricks
- maintainers
- License
- Topics

generated...
2007-08-05

(C) 2007 guidod
Download the M4 Source.

merk_prog_tcl

Back to the Main Page.

Synopsis
MERK_PROG_TCL([min-version])
, 
Version

2005-01-21

Author

Uwe Mayer <merkosh@hadiko.de>

License

GPLWithACException
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation. As a special exception, the respective Autoconf Macro's copyright owner gives unlimited permission to copy, distribute and modify the configure scripts that are the output of Autoconf when processing the Macro. You need not follow the terms of the GNU General Public License when using or distributing such scripts

Category

cryp.to ac-archive's Installed Packages (released)

Documentation

Searches for tcl (tclsh and wish) in PATH and checks which version is installed. The macro bails out if either tcl is not found or the minimum version is not satisfied, unless minimum version is "0".

Example:

MERK_PROG_TCL

This checks for tcl and if not found, exits with an error. If found, it prints tcl path and version number.

MERK_PROG_TCL([8.0])

Checks for tcl and exits with an error if its not found or the version is below 8.0.

M4 Source Code
AC_DEFUN([MERK_PROG_TCL], [
#-- check for tclsh in PATH
AC_PATH_PROG([TCLSH], [tclsh], [no])
if [(test x"$TCLSH" == x"no") &amp;&amp; (test x"$1" != x"0")]; then
        AC_MSG_ERROR([tclsh not found])
fi

#-- check for wish in PATH
AC_PATH_PROG([WISH], [wish], [no])

#-- check vor tcl version
AC_MSG_CHECKING([tcl version])
tmp=$(tempfile)
echo ["puts [set tcl_version]"] &gt;"$tmp"
version=$(tclsh "$tmp")
rm "$tmp"
AC_MSG_RESULT([$version])

#-- compare tcl version with min-version
required=$1
if [(test x"$1" != x"") &amp;&amp; (test "${required/./}" -gt "${version/./}")]; then
        AC_MSG_ERROR([tcl version $1 required])
fi
])dnl