configure.ac 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163
  1. define(EMACS_GUIX_CONFIGURE_COPYRIGHT, [[
  2. Copyright (C) 2016-2020 Alex Kost <alezost@gmail.com>
  3. This file is part of Emacs-Guix.
  4. Emacs-Guix is free software; you can redistribute it and/or modify
  5. it under the terms of the GNU General Public License as published by
  6. the Free Software Foundation, either version 3 of the License, or
  7. (at your option) any later version.
  8. Emacs-Guix is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. GNU General Public License for more details.
  12. You should have received a copy of the GNU General Public License
  13. along with Emacs-Guix. If not, see <http://www.gnu.org/licenses/>.
  14. ]])
  15. AC_INIT([Emacs-Guix], [0.5.2], [alezost@gmail.com], [emacs-guix],
  16. [https://emacs-guix.gitlab.io/website/])
  17. AC_COPYRIGHT(EMACS_GUIX_CONFIGURE_COPYRIGHT)
  18. AC_CONFIG_AUX_DIR([build-aux])
  19. AM_INIT_AUTOMAKE([foreign subdir-objects])
  20. AM_SILENT_RULES([yes])
  21. dnl ----------------------------------------------------------------
  22. dnl Guile side
  23. GUILE_PKG([3.0 2.2 2.0])
  24. GUILE_PROGS([2.0.2])
  25. AC_ARG_WITH([guile-site-dir],
  26. [AS_HELP_STRING([--with-guile-site-dir],
  27. [installation directory for Guile (*.scm) files])],
  28. [guilemoduledir="$withval"],
  29. [guilemoduledir="$datarootdir/guile/site/$GUILE_EFFECTIVE_VERSION"])
  30. AC_SUBST([guilemoduledir])
  31. AC_MSG_CHECKING([for the Guile module directory])
  32. AC_MSG_RESULT([$guilemoduledir])
  33. AC_ARG_WITH([guile-site-ccache-dir],
  34. [AS_HELP_STRING([--with-guile-site-ccache-dir],
  35. [installation directory for Guile compiled (*.go) files])],
  36. [guileccachedir="$withval"],
  37. [guileccachedir="$libdir/guile/$GUILE_EFFECTIVE_VERSION/site-ccache"])
  38. AC_SUBST([guileccachedir])
  39. AC_MSG_CHECKING([for the Guile ccache directory])
  40. AC_MSG_RESULT([$guileccachedir])
  41. AC_ARG_WITH([guix-site-dir],
  42. [AS_HELP_STRING([--with-guix-site-dir],
  43. [directory with Guix modules (*.scm files)])],
  44. [guixmoduledir="$withval"],
  45. [guixmoduledir=""])
  46. AC_SUBST([guixmoduledir])
  47. AC_ARG_WITH([guix-site-ccache-dir],
  48. [AS_HELP_STRING([--with-guix-site-ccache-dir],
  49. [directory with Guix compiled (*.go) files])],
  50. [guixccachedir="$withval"],
  51. [guixccachedir=""])
  52. dnl If ccache dir is not specified, set it to the module dir.
  53. AS_IF([test "x$guixccachedir" = "x" -a \
  54. "x$guixmoduledir" != "x"],
  55. [guixccachedir="$guixmoduledir"])
  56. AC_SUBST([guixccachedir])
  57. AM_CONDITIONAL([GUIX_DIR], [test "x$guixmoduledir" != "x"])
  58. AC_ARG_WITH([guile-gcrypt-site-dir],
  59. [AS_HELP_STRING([--with-guile-gcrypt-site-dir],
  60. [directory with Guile-Gcrypt modules (*.scm files)])],
  61. [guilegcryptmoduledir="$withval"],
  62. [guilegcryptmoduledir=""])
  63. AC_SUBST([guilegcryptmoduledir])
  64. AC_ARG_WITH([guile-gcrypt-site-ccache-dir],
  65. [AS_HELP_STRING([--with-guile-gcrypt-site-ccache-dir],
  66. [directory with Guile-Gcrypt compiled (*.go) files])],
  67. [guilegcryptccachedir="$withval"],
  68. [guilegcryptccachedir=""])
  69. AS_IF([test "x$guilegcryptccachedir" = "x" -a \
  70. "x$guilegcryptmoduledir" != "x"],
  71. [guilegcryptccachedir="$guilegcryptmoduledir"])
  72. AC_SUBST([guilegcryptccachedir])
  73. AM_CONDITIONAL([GUILE_GCRYPT_DIR], [test "x$guilegcryptmoduledir" != "x"])
  74. dnl ----------------------------------------------------------------
  75. dnl Emacs side
  76. AC_PATH_PROG([EMACS], [emacs])
  77. AC_SUBST([EMACS])
  78. AC_ARG_WITH([lispdir],
  79. [AS_HELP_STRING([--with-lispdir],
  80. [directory for Emacs-Lisp (*.el) files])],
  81. [lispdir="$withval"],
  82. [lispdir="$datarootdir/emacs/site-lisp"])
  83. AC_SUBST([lispdir])
  84. AC_MSG_CHECKING([for the Emacs-Lisp directory])
  85. AC_MSG_RESULT([$lispdir])
  86. AC_ARG_WITH([geiser-lispdir],
  87. [AS_HELP_STRING([--with-geiser-lispdir],
  88. [directory with Geiser *.el files])],
  89. [geiserlispdir="$withval"],
  90. [geiserlispdir="no"])
  91. AC_SUBST([geiserlispdir])
  92. AC_ARG_WITH([dash-lispdir],
  93. [AS_HELP_STRING([--with-dash-lispdir],
  94. [directory with dash.el file])],
  95. [dashlispdir="$withval"],
  96. [dashlispdir="no"])
  97. AC_SUBST([dashlispdir])
  98. AC_ARG_WITH([bui-lispdir],
  99. [AS_HELP_STRING([--with-bui-lispdir],
  100. [directory with BUI *.el files])],
  101. [builispdir="$withval"],
  102. [builispdir="no"])
  103. AC_SUBST([builispdir])
  104. AC_ARG_WITH([editindirect-lispdir],
  105. [AS_HELP_STRING([--with-editindirect-lispdir],
  106. [directory with edit-indirect.el file])],
  107. [editindirectlispdir="$withval"],
  108. [editindirectlispdir="no"])
  109. AC_SUBST([editindirectlispdir])
  110. AC_ARG_WITH([popup-lispdir],
  111. [AS_HELP_STRING([--with-popup-lispdir],
  112. [directory with magit-popup.el file])],
  113. [popuplispdir="$withval"],
  114. [popuplispdir="no"])
  115. AC_SUBST([popuplispdir])
  116. AM_CONDITIONAL([GEISER_DIR], [test "x$geiserlispdir" != "xno"])
  117. AM_CONDITIONAL([DASH_DIR], [test "x$dashlispdir" != "xno"])
  118. AM_CONDITIONAL([BUI_DIR], [test "x$builispdir" != "xno"])
  119. AM_CONDITIONAL([EDITINDIRECT_DIR], [test "x$editindirectlispdir" != "xno"])
  120. AM_CONDITIONAL([POPUP_DIR], [test "x$popuplispdir" != "xno"])
  121. dnl If all elisp dependencies are specified, we can use "emacs -Q" for
  122. dnl byte-compilation. Otherwise, "emacs" will be used, and it will
  123. dnl hopefully find these packages in its 'load-path'.
  124. AM_CONDITIONAL([EMACS_Q],
  125. [test "x$geiserlispdir" != "xno" -a \
  126. "x$dashlispdir" != "xno" -a \
  127. "x$builispdir" != "xno" -a \
  128. "x$editindirectlispdir" != "xno" -a \
  129. "x$popuplispdir" != "xno"])
  130. dnl ----------------------------------------------------------------
  131. AC_CONFIG_FILES([Makefile
  132. scheme/Makefile
  133. elisp/guix-build-config.el])
  134. AC_OUTPUT