-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure.in
281 lines (248 loc) · 7.99 KB
/
configure.in
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
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
# $Id: configure.in,v 1.9 2005/02/25 13:58:26 ihatchondo Exp $
AC_INIT()
# macro
AC_DEFUN(WM_MSG,[AC_MSG_WARN([*** $1])])
# implementation dependant lisp system args :
core_switch=""
load_switch=""
eval_switch=""
# implementation dependant lisp functions :
save_lisp=""
quit_form=""
eclipsedir=${libdir}/eclipse
lisp_system=""
SRC=`pwd`
LISP=""
INITCORE=""
CORENAME="eclipse.core"
COREDIR=${eclipsedir}
ARGS=""
initfile=".eclipse"
usecore="yes"
gnome_entry_dir=""
interp=""
# standard tests
AC_SYS_INTERPRETER
AC_PROG_INSTALL
# with and enable args.
AC_ARG_ENABLE(compile-into-core,
[ --enable-compile-into-core=[yes|no] compile to core],
if test "$enableval" = no
then usecore=no
else usecore=yes
fi)
AC_ARG_WITH(core-switch,
[ --with-core-switch=arg lisp command line argument to start a specific image],
if test -n "$withval";
then if test "$withval" = "yes" -o "$withval" = "no"; then :;
else core_switch="$withval"; fi
fi)
AC_ARG_WITH(load-switch,
[ --with-load-switch=arg lisp command line argument to load a file],
if test -n "$withval";
then if test "$withval" = "yes" -o "$withval" = "no"; then :;
else load_switch="$withval"; fi
fi)
AC_ARG_WITH(eval-switch,
[ --with-eval-switch=arg lisp command line argument to eval forms],
if test -n "$withval";
then if test "$withval" = "yes" -o "$withval" = "no"; then :;
else eval_switch="$withval"; fi
fi)
AC_ARG_WITH(save-lisp,
[ --with-save-lisp=name lisp function name to save a lisp image],
if test -n "$withval";
then if test "$withval" = "yes" -o "$withval" = "no"; then :;
else save_lisp="$withval"; fi
fi)
AC_ARG_WITH(quit-form,
[ --with-quit-form=form lisp form to exit your lisp system],
if test -n "$withval";
then if test "$withval" = "yes" -o "$withval" = "no"; then :;
else quit_form="$withval"; fi
fi)
AC_ARG_WITH(lisp-system,
[ --with-lisp-system=feature lisp system feature name (:cmu, :sbcl, ...)],
if test -n "$withval";
then if test "$withval" = "yes" -o "$withval" = "no"; then :;
else lisp_system="$withval"; fi
fi)
AC_ARG_WITH(initfile,
[ --with-initfile=FILE where to find your eclipse startup file],
if test -n "$withval";
then if test "$withval" = "yes" -o "$withval" = "no"; then :;
else initfile="$withval"; fi
fi)
AC_ARG_WITH(corename,
[ --with-corename=FILE what is the name of the core image to dump],
if test -n "$withval"
then if test "$withval" = "yes" -o "$withval" = "no"; then :;
else CORENAME="$withval"; fi
fi)
AC_ARG_WITH(coredest,
[ --with-coredest=DIR what is the destination of the dumped core image],
if test -n "$withval" -a -d "$withval"
then if test "$withval" = "yes" -o "$withval" = "no"; then :;
else COREDIR="$withval"; fi
fi)
AC_ARG_WITH(initcore,
[ --with-initcore=FILE the name of the core to use when compiling],
if test -n "$withval" -a -r "$withval"
then if test "$withval" = "yes" -o "$withval" = "no"; then :;
else INITCORE="$withval"; fi
fi)
AC_ARG_WITH(gnome_entry_dir,
[ --with-gnome-entry-dir=[PATH] path to the gnome WM entries directory],
gnome_entry_dir="$withval"
if test -z "${gnome_entry_dir}"
then gnome_entry_dir=yes
fi,
gnome_entry_dir=yes)
AC_ARG_WITH(lisp,
[ --with-lisp=DIR or FILE where to find your lisp system],
LISP="$withval",
# we only know the current name of cmucl and sbcl, please add more.
[AC_PATH_PROGS(LISP,lisp sbcl)])
#
# user gave a directory for the lisp system
if test -n $LISP && test -d $LISP
then LISP=`dirname $LISP/lisp`/lisp
fi
#
# Perform final deduction on the lisp system we got.
# We currently only have information for cmucl and sbcl,
# so please add more systems.
#
if test -x $LISP
then ### a lisp system was found or specified try to decide which one it is.
if test -z "$lisp_system"
then case `basename $LISP` in
lisp) lisp_system=:cmu;;
sbcl) lisp_system=:sbcl;;
clisp) lisp_system=:clisp;;
esac
fi
# Now checks lisp machine args in case we know them.
case "$lisp_system" in
:cmu)
if test -z "$load_switch"; then load_switch="-load"; fi
if test -z "$core_switch"; then core_switch="-core"; fi
if test -z "$eval_switch"; then eval_switch="-eval"; fi
if test -z "$save_lisp"; then save_lisp="save-lisp"; fi
;;
:sbcl)
if test -z "$load_switch"; then load_switch="--load"; fi
if test -z "$core_switch"; then core_switch="--core"; fi
if test -z "$eval_switch"; then eval_switch="--eval"; fi
if test -z "$save_lisp"; then save_lisp="sb-ext:save-lisp-and-die"; fi
;;
:clisp)
if test -z "$load_switch"; then load_switch="-i"; fi
if test -z "$core_switch"; then core_switch="-M"; fi
if test -z "$eval_switch"; then eval_switch="-x"; fi
if test -z "$save_lisp"; then save_lisp="saveinitmem"; fi
;;
esac
# Verify we have all the infos we need.
if test -z "$load_switch" || test -z "$core_switch" ||
test -z "$eval_switch" || test -z "$save_lisp"
then
WM_MSG(We have a lisp system named: ${LISP}, but:)
if test -z "$load_switch"; then WM_MSG(- load switch is missing); fi
if test -z "$core_switch"; then WM_MSG(- core switch is missing); fi
if test -z "$eval_switch"; then WM_MSG(- eval switch is missing); fi
if test -z "$save_lisp"; then WM_MSG(- save-lisp function is missing); fi
AC_MSG_ERROR([*** Maybe you want to use --with-<...>-switch])
fi
else ### No lisp system found at all !!!
AC_MSG_WARN([*** Cannot find a lisp system])
AC_MSG_ERROR([*** Maybe you want to use --with-lisp])
fi
#
# extra check for gnome wm-properties directory.
AC_CACHE_CHECK(checking for gnome wm-properties directory,
clwm_cv_gnome_entry_dir,
for dir in ${gnome_entry_dir} /usr/share/gnome /usr/local/share/gnome
do
if test $dir = no
then break
elif test -d $dir
then gnome_entry_dir=$dir/wm-properties; break
else gnome_entry_dir=no
fi
done
clwm_cv_gnome_entry_dir=${gnome_entry_dir})
gnome_entry_dir=${clwm_cv_gnome_entry_dir}
#
# prepare the lisp arguments for the wm loader.
if test -n "${INITCORE}"; then INITCORE="${core_switch} ${INITCORE}"; fi
if test ${usecore} = yes
then
ARGS="${core_switch} ${COREDIR}/${CORENAME}\
${eval_switch} \"(eclipse:eclipse \${options})\""
else
ARGS="${INITCORE} ${load_switch} ${SRC}/load-eclipse.lisp\
${eval_switch} \"(eclipse:eclipse \${options})\""
fi
#
# set interp.
if test $interpval = yes
then interp="#!"
else interp=""
fi
#
# Final substitutions
AC_SUBST(interp)
AC_SUBST(SHELL)
AC_SUBST(LISP)
AC_SUBST(INITCORE)
AC_SUBST(CORENAME)
AC_SUBST(COREDIR)
AC_SUBST(SRC)
AC_SUBST(ARGS)
AC_SUBST(INSTALL)
AC_SUBST(eval_switch)
AC_SUBST(core_switch)
AC_SUBST(load_switch)
AC_SUBST(save_lisp)
AC_SUBST(quit_form)
AC_SUBST(usecore)
AC_SUBST(initfile)
AC_SUBST(eclipsedir)
AC_SUBST(gnome_entry_dir)
AC_OUTPUT([Makefile eclipse load-eclipse.lisp config.lisp])
if test ${gnome_entry_dir} = yes; then :; else
printf "creating Eclipse.desktop"
cat > Eclipse.desktop <<\EOF
[[Desktop Entry]]
Name=Eclipse
Exec=eclipse
TryExec=eclipse
Terminal=false
MultipleArgs=false
[[Window Manager]]
SessionManaged=false
EOF
fi
#
# Configuration report
printf "\n\nConfiguration report\n"
printf " - install prefix : ${prefix}\n"
printf " - exec prefix : ${exec_prefix}/bin\n"
printf " - eclipse dir : ${eclipsedir}\n"
printf " - eclipse startup file : ${initfile}\n"
printf " - lisp system found : ${LISP}\n"
printf " - lisp options\n"
printf " - lisp feature name : ${lisp_system}\n"
printf " - save-lisp function : ${save_lisp}\n"
printf " - load command line arg : ${load_switch}\n"
printf " - eval command line arg : ${eval_switch}\n"
printf " - core command line arg : ${core_switch}\n"
printf " - lisp quit form : ${quit_form}\n"
printf " - use core when compiling : ${INITCORE}\n"
printf " - compile and dump image : ${usecore}\n"
if test "${usecore}" = yes ; then
printf " - image path : ${COREDIR}/${CORENAME}\n"
fi
printf " - create gnome entry : ${gnome_entry_dir}\n"
printf " - installer : ${INSTALL}\n"