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.

98 lines
3.5KB

  1. # ===========================================================================
  2. # https://www.gnu.org/software/autoconf-archive/ax_prog_xsltproc.html
  3. # ===========================================================================
  4. #
  5. # SYNOPSIS
  6. #
  7. # AX_PROG_XSLTPROC([default-flags])
  8. #
  9. # DESCRIPTION
  10. #
  11. # Find an xsltproc executable.
  12. #
  13. # Input:
  14. #
  15. # "default-flags" is the default $XSLTPROC_FLAGS, which will be overridden
  16. # if the user specifies --with-xsltproc-flags.
  17. #
  18. # Output:
  19. #
  20. # $XSLTPROC contains the path to xsltproc, or is empty if none was found
  21. # or the user specified --without-xsltproc. $XSLTPROC_FLAGS contains the
  22. # flags to use with xsltproc.
  23. #
  24. # LICENSE
  25. #
  26. # Copyright (c) 2008,2009 Zmanda Inc. <http://www.zmanda.com/>
  27. # Copyright (c) 2008,2009 Dustin J. Mitchell <dustin@zmanda.com>
  28. #
  29. # This program is free software; you can redistribute it and/or modify it
  30. # under the terms of the GNU General Public License as published by the
  31. # Free Software Foundation; either version 2 of the License, or (at your
  32. # option) any later version.
  33. #
  34. # This program is distributed in the hope that it will be useful, but
  35. # WITHOUT ANY WARRANTY; without even the implied warranty of
  36. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
  37. # Public License for more details.
  38. #
  39. # You should have received a copy of the GNU General Public License along
  40. # with this program. If not, see <https://www.gnu.org/licenses/>.
  41. #
  42. # As a special exception, the respective Autoconf Macro's copyright owner
  43. # gives unlimited permission to copy, distribute and modify the configure
  44. # scripts that are the output of Autoconf when processing the Macro. You
  45. # need not follow the terms of the GNU General Public License when using
  46. # or distributing such scripts, even though portions of the text of the
  47. # Macro appear in them. The GNU General Public License (GPL) does govern
  48. # all other use of the material that constitutes the Autoconf Macro.
  49. #
  50. # This special exception to the GPL applies to versions of the Autoconf
  51. # Macro released by the Autoconf Archive. When you make and distribute a
  52. # modified version of the Autoconf Macro, you may extend this special
  53. # exception to the GPL to apply to your modified version as well.
  54. #serial 9
  55. AU_ALIAS([AC_PROG_XSLTPROC], [AX_PROG_XSLTPROC])
  56. AC_DEFUN([AX_PROG_XSLTPROC],
  57. [
  58. XSLTPROC_FLAGS="$1"
  59. AC_SUBST(XSLTPROC_FLAGS)
  60. # The (lack of) whitespace and overquoting here are all necessary for
  61. # proper formatting.
  62. AC_ARG_WITH(xsltproc,
  63. AS_HELP_STRING([--with-xsltproc[[[[[=PATH]]]]]],
  64. [Use the xsltproc binary in PATH.]),
  65. [ ac_with_xsltproc=$withval; ],
  66. [ ac_with_xsltproc=maybe; ])
  67. AC_ARG_WITH(xsltproc-flags,
  68. AS_HELP_STRING([ --with-xsltproc-flags=FLAGS],
  69. [Flags to pass to xsltproc (default $1)]),
  70. [ if test "x$withval" = "xno"; then
  71. XSLTPROC_FLAGS=''
  72. else
  73. if test "x$withval" != "xyes"; then
  74. XSLTPROC_FLAGS="$withval"
  75. fi
  76. fi
  77. ])
  78. # search for xsltproc if it wasn't specified
  79. if test "$ac_with_xsltproc" = "yes" -o "$ac_with_xsltproc" = "maybe"; then
  80. AC_PATH_PROGS(XSLTPROC,xsltproc)
  81. else
  82. if test "$ac_with_xsltproc" != "no"; then
  83. if test -x "$ac_with_xsltproc"; then
  84. XSLTPROC="$ac_with_xsltproc";
  85. else
  86. AC_MSG_WARN([Specified xsltproc of $ac_with_xsltproc isn't])
  87. AC_MSG_WARN([executable; searching for an alternative.])
  88. AC_PATH_PROGS(XSLTPROC,xsltproc)
  89. fi
  90. fi
  91. fi
  92. ])