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.

69 lines
2.9KB

  1. # ===========================================================================
  2. # https://www.gnu.org/software/autoconf-archive/ax_prog_emacs.html
  3. # ===========================================================================
  4. #
  5. # SYNOPSIS
  6. #
  7. # AX_PROG_EMACS
  8. #
  9. # DESCRIPTION
  10. #
  11. # This macro allows the end user to specify a particular Emacs executable
  12. # via a configure script command-line arg. For example:
  13. #
  14. # ./configure EMACS=$HOME/build/GNU/emacs/src/emacs
  15. #
  16. # It also arranges to mention env var EMACS in the './configure --help'
  17. # output. See info node "(autoconf) Generic Programs" for details.
  18. #
  19. # More precisely...
  20. #
  21. # If env var EMACS is set, try to use its value directly, but avoid
  22. # getting fooled by value 't' (set by older Emacsen for subprocesses). If
  23. # no joy from the environment, search for "emacs" via AC_CHECK_PROG. If
  24. # still no joy, display "Emacs not found; required!" and make configure
  25. # exit failurefully. Otherwise, set shell var EMACS and AC_SUBST it, too.
  26. #
  27. # LICENSE
  28. #
  29. # Copyright (c) 2016-2017 Thien-Thi Nguyen
  30. #
  31. # This program is free software; you can redistribute it and/or modify it
  32. # under the terms of the GNU General Public License as published by the
  33. # Free Software Foundation; either version 3 of the License, or (at your
  34. # option) any later version.
  35. #
  36. # This program is distributed in the hope that it will be useful, but
  37. # WITHOUT ANY WARRANTY; without even the implied warranty of
  38. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
  39. # Public License for more details.
  40. #
  41. # You should have received a copy of the GNU General Public License along
  42. # with this program. If not, see <https://www.gnu.org/licenses/>.
  43. #
  44. # As a special exception, the respective Autoconf Macro's copyright owner
  45. # gives unlimited permission to copy, distribute and modify the configure
  46. # scripts that are the output of Autoconf when processing the Macro. You
  47. # need not follow the terms of the GNU General Public License when using
  48. # or distributing such scripts, even though portions of the text of the
  49. # Macro appear in them. The GNU General Public License (GPL) does govern
  50. # all other use of the material that constitutes the Autoconf Macro.
  51. #
  52. # This special exception to the GPL applies to versions of the Autoconf
  53. # Macro released by the Autoconf Archive. When you make and distribute a
  54. # modified version of the Autoconf Macro, you may extend this special
  55. # exception to the GPL to apply to your modified version as well.
  56. #serial 2
  57. AC_DEFUN([AX_PROG_EMACS],[dnl
  58. AC_ARG_VAR([EMACS],[Use this Emacs to byte-compile the Emacs Lisp files.])
  59. dnl Allow env override but do not get fooled by 'EMACS=t'.
  60. test t = "$EMACS" && unset EMACS
  61. dnl The next line does nothing if var 'EMACS' is already set.
  62. AC_CHECK_PROG([EMACS], [emacs], [emacs])
  63. AS_IF([test "x$EMACS" = x],[AC_MSG_ERROR([Emacs not found; required!])])
  64. ])dnl
  65. dnl ax_prog_emacs.m4 ends here