Collection of DPF-based plugins for packaging
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

81 lines
2.9KB

  1. # ===========================================================================
  2. # https://www.gnu.org/software/autoconf-archive/ax_prog_tcl.html
  3. # ===========================================================================
  4. #
  5. # SYNOPSIS
  6. #
  7. # AX_PROG_TCL([min-version])
  8. #
  9. # DESCRIPTION
  10. #
  11. # Searches for tcl (tclsh and wish) in PATH and checks which version is
  12. # installed. The macro bails out if either tcl is not found or the minimum
  13. # version is not satisfied, unless minimum version is "0".
  14. #
  15. # Example:
  16. #
  17. # AX_PROG_TCL
  18. #
  19. # This checks for tcl and if not found, exits with an error. If found, it
  20. # prints tcl path and version number.
  21. #
  22. # AX_PROG_TCL([8.0])
  23. #
  24. # Checks for tcl and exits with an error if its not found or the version
  25. # is below 8.0.
  26. #
  27. # LICENSE
  28. #
  29. # Copyright (c) 2008 David Cluytens
  30. # Copyright (c) 2008 Uwe Mayer <merkosh@hadiko.de>
  31. #
  32. # This program is free software: you can redistribute it and/or modify it
  33. # under the terms of the GNU General Public License as published by the
  34. # Free Software Foundation, either version 3 of the License, or (at your
  35. # option) any later version.
  36. #
  37. # This program is distributed in the hope that it will be useful, but
  38. # WITHOUT ANY WARRANTY; without even the implied warranty of
  39. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
  40. # Public License for more details.
  41. #
  42. # You should have received a copy of the GNU General Public License along
  43. # with this program. If not, see <https://www.gnu.org/licenses/>.
  44. #
  45. # As a special exception, the respective Autoconf Macro's copyright owner
  46. # gives unlimited permission to copy, distribute and modify the configure
  47. # scripts that are the output of Autoconf when processing the Macro. You
  48. # need not follow the terms of the GNU General Public License when using
  49. # or distributing such scripts, even though portions of the text of the
  50. # Macro appear in them. The GNU General Public License (GPL) does govern
  51. # all other use of the material that constitutes the Autoconf Macro.
  52. #
  53. # This special exception to the GPL applies to versions of the Autoconf
  54. # Macro released by the Autoconf Archive. When you make and distribute a
  55. # modified version of the Autoconf Macro, you may extend this special
  56. # exception to the GPL to apply to your modified version as well.
  57. #serial 8
  58. AC_DEFUN([AX_PROG_TCL], [
  59. #-- check for tclsh in PATH
  60. AC_PATH_PROG([TCLSH], [tclsh], [no])
  61. if [(test x"$TCLSH" == x"no") && (test x"$1" != x"0")]; then
  62. AC_MSG_ERROR([tclsh not found])
  63. fi
  64. #-- check for wish in PATH
  65. AC_PATH_PROG([WISH], [wish], [no])
  66. #-- check vor tcl version
  67. AC_MSG_CHECKING([tcl version])
  68. version=`echo "puts [[set tcl_version]]" | tclsh -`
  69. AC_MSG_RESULT([$version])
  70. #-- compare tcl version with min-version
  71. required=$1
  72. if [(test x"$1" != x"") && (test "${required/./}" -gt "${version/./}")]; then
  73. AC_MSG_ERROR([tcl version $1 required])
  74. fi
  75. ])dnl