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