configure.ac 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  1. define(EMACS_GUIX_CONFIGURE_COPYRIGHT, [[
  2. Copyright (C) 2016-2017 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.3.4], [alezost@gmail.com], [emacs-guix],
  16. [https://alezost.github.io/guix.el/])
  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([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. dnl ----------------------------------------------------------------
  59. dnl Emacs side
  60. AC_PATH_PROG([EMACS], [emacs])
  61. AC_SUBST([EMACS])
  62. AC_ARG_WITH([lispdir],
  63. [AS_HELP_STRING([--with-lispdir],
  64. [directory for Emacs-Lisp (*.el) files])],
  65. [lispdir="$withval"],
  66. [lispdir="$datarootdir/emacs/site-lisp"])
  67. AC_SUBST([lispdir])
  68. AC_MSG_CHECKING([for the Emacs-Lisp directory])
  69. AC_MSG_RESULT([$lispdir])
  70. AC_ARG_WITH([geiser-lispdir],
  71. [AS_HELP_STRING([--with-geiser-lispdir],
  72. [directory with Geiser *.el files])],
  73. [geiserlispdir="$withval"],
  74. [geiserlispdir="no"])
  75. AC_SUBST([geiserlispdir])
  76. AC_ARG_WITH([dash-lispdir],
  77. [AS_HELP_STRING([--with-dash-lispdir],
  78. [directory with dash.el file])],
  79. [dashlispdir="$withval"],
  80. [dashlispdir="no"])
  81. AC_SUBST([dashlispdir])
  82. AC_ARG_WITH([bui-lispdir],
  83. [AS_HELP_STRING([--with-bui-lispdir],
  84. [directory with BUI *.el files])],
  85. [builispdir="$withval"],
  86. [builispdir="no"])
  87. AC_SUBST([builispdir])
  88. AC_ARG_WITH([popup-lispdir],
  89. [AS_HELP_STRING([--with-popup-lispdir],
  90. [directory with magit-popup.el file])],
  91. [popuplispdir="$withval"],
  92. [popuplispdir="no"])
  93. AC_SUBST([popuplispdir])
  94. AM_CONDITIONAL([GEISER_DIR], [test "x$geiserlispdir" != "xno"])
  95. AM_CONDITIONAL([DASH_DIR], [test "x$dashlispdir" != "xno"])
  96. AM_CONDITIONAL([BUI_DIR], [test "x$builispdir" != "xno"])
  97. AM_CONDITIONAL([POPUP_DIR], [test "x$popuplispdir" != "xno"])
  98. dnl If all elisp dependencies are specified, we can use "emacs -Q" for
  99. dnl byte-compilation. Otherwise, "emacs" will be used, and it will
  100. dnl hopefully find these packages in its 'load-path'.
  101. AM_CONDITIONAL([EMACS_Q],
  102. [test "x$geiserlispdir" != "xno" -a \
  103. "x$dashlispdir" != "xno" -a \
  104. "x$builispdir" != "xno" -a \
  105. "x$popuplispdir" != "xno"])
  106. dnl ----------------------------------------------------------------
  107. AC_CONFIG_FILES([Makefile
  108. scheme/Makefile
  109. elisp/guix-build-config.el])
  110. AC_OUTPUT