-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfigure.ac
275 lines (228 loc) · 9.02 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
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
qdnl Process this with autoconf to create configure
AC_INIT([kawa],[2.2.1]) dnl Also update bin/configure.ac and build.xml.
echo "Kawa's Subversion repository is no longer used."
echo "Get the sources using Git instead: clone https://gitlab.com/kashell/Kawa.git"
exit -1
AC_CONFIG_SRCDIR([doc/kawa.texi])
AC_ARG_ENABLE(obsolete-kawa)
if test -z "${enable_obsolete_kawa}"
then
echo The Subversion respository of Kawa is obsolete. Kawa now uses git.
echo To continue anyway, add --enable-obsolete-kawa to the configure command.
echo Get the Kawa sources from https://gitlab.com/kashell/Kawa
exit -1
fi
AM_MAINTAINER_MODE([enable])
AC_CANONICAL_HOST
AM_INIT_AUTOMAKE([info-in-builddir])
dnl AC_ARG_WITH(classpath,[ --with-classpath Path to Java classes], classpath=$withval, classpath=$$CLASSPATH)
AC_ARG_ENABLE(kawa-frontend,
[ --enable-kawa-frontend Build "kawa" front-end program using readline],
enable_kawa_frontend=$enableval, enable_kawa_frontend=no)
AC_ARG_ENABLE(xml,
AS_HELP_STRING(--disable-xml,Don't build support for XML processing),
enable_xml=$enableval, enable_xml=yes)
AC_ARG_WITH(servlet,
AS_HELP_STRING(--with-servlet@<:@=servlet-api.jar@:>@,Build support for generating servlets))
WITH_SERVLET_ARG="${with_servlet}"
AC_ARG_WITH(android,
AS_HELP_STRING(--with-android@<:@=android.jar@:>@,Build for the Android platform))
AC_ARG_WITH(javafx,
AS_HELP_STRING(--with-javafx@<:@=jfxrt.jar@:>@,Enable support for JavaFX))
WITH_JAVAFX_ARG="${with_javafx}"
AC_ARG_WITH(domterm,
AS_HELP_STRING(--with-domterm=<:@=domterm.jar@:>@,Build support for DomTerm))
WITH_DOMTERM_ARG="${with_domterm}"
AC_ARG_WITH(jline3,
AS_HELP_STRING(--with-jline3=<:@=jline3.jar@:>@,Build support JLine3 input editing))
AC_ARG_WITH(XQTS,
AS_HELP_STRING(--with-XQTS@<:@=XQTS-path@:>@,Support XQuery Test Suite))
AC_ARG_ENABLE(echo2,
AS_HELP_STRING(--enable-echo2,Enable support for the Echo2 web toolkit))
AC_ARG_ENABLE(jemacs,
AS_HELP_STRING(--enable-jemacs,Build JEmacs))
AC_ARG_ENABLE(xquery,
AS_HELP_STRING(--enable-xquery,Build XQuery language support (Qexo) (default on)))
AC_ARG_ENABLE(brl,
AS_HELP_STRING(--enable-brl,Build BRL emulation and KRL))
AC_ARG_WITH(httpserver,
AS_HELP_STRING(--with-httpserver,Make use of JDK6's builtin http server))
AC_ARG_WITH(swing,
AS_HELP_STRING(--with-swing,Assume Swing is available (default on)))
AC_ARG_WITH(swt,
AS_HELP_STRING(--with-swt,Assume SWT is available))
AC_ARG_WITH(awt,
AS_HELP_STRING(--with-awt,Assume AWT is available (default on)))
AC_ARG_WITH(sax2,
AS_HELP_STRING(--with-sax2, Assume SAX2 is available (default on)))
AC_ARG_WITH(javax.script,
AS_HELP_STRING(--with-javax.script, Use javax.script interfaces))
AC_ARG_WITH(java-source,
AS_HELP_STRING(--with-java-source=NUM,Assume functionality of given Java/JDK version))
test -z "${with_java_source}" -a -n "${with_android}" \
&& with_java_source=android
test -z "${with_swing}" -a "$with_awt" == "no" \
&& with_swing=no
with_java_source=`echo ${with_java_source} | tr A-Z a-z`
# Java 7 is the (current) default
test "${with_java_source}" = "" && with_java_source=7
case "/${with_java_source}/" in
/1/|/1.1*/) # JDK 1.1 - not supported
JAVA_SOURCE=1; JAVA_SOURCE_SELECTOR='%java1';;
/2/|/1.2*/|/1.3*/) # JDK 1.2+, GCJ-3.x - not supported
JAVA_SOURCE=2; JAVA_SOURCE_SELECTOR='%java2' ;;
/4/|/1.4*/) # JDK 1.4, GCJ-4.x, without JAXP - not supported
JAVA_SOURCE=4; JAVA_SOURCE_SELECTOR='%java4' ;;
/4x/|/1.4*+jaxp1.3/) # JDK 1.4, GCJ-4.x with JAXP 1.3 - not supported
JAVA_SOURCE=4x; JAVA_SOURCE_SELECTOR='%java4x' ;;
/5/|/1.5*/) # JDK 1.5
JAVA_SOURCE=5; JAVA_SOURCE_SELECTOR='%java5' ;;
/6/|/1.6*/) # JDK 1.6
JAVA_SOURCE=6; JAVA_SOURCE_SELECTOR='%java6' ;;
/6compat5/) # JDK 1.5 with some Java6 features.
# Requires building with Java6, but runs on Java5 (without those features)
# or on Java6 (with those features).
JAVA_SOURCE=6compat5; JAVA_SOURCE_SELECTOR='%java6compat5' ;;
/7/|/1.7*/) # JDK 1.7
JAVA_SOURCE=7; JAVA_SOURCE_SELECTOR='%java7' ;;
/8/|/1.8*/) # Java 8
JAVA_SOURCE=8; JAVA_SOURCE_SELECTOR='%java8' ;;
/9/|/1.9*/) # Java 9
JAVA_SOURCE=9; JAVA_SOURCE_SELECTOR='%java9' ;;
/android*/)
JAVA_SOURCE=android; JAVA_SOURCE_SELECTOR='%android'
test -z "$with_swing" && with_swing="no"
test -z "$with_awt" && with_awt="no"
;;
/*/) AC_MSG_ERROR([Invalid version for --with-java-version.
(Must be 1, 2, 5, 6, 7, 8, 9, or a JDK version such as 1.5.)]) ;;
esac
AC_SUBST(JAVA_SOURCE)
AC_SUBST(JAVA_SOURCE_SELECTOR)
if test -z "$with_sax2" ; then
case "$JAVA_SOURCE" in
1|2|3) with_sax2="no";;
esac
fi
if test -z "$with_javax_script"; then
case "$JAVA_SOURCE" in
6compat5|6|7|8|9) with_javax_script="yes";;
esac
fi
if test -z "$with_httpserver"; then
case "$JAVA_SOURCE" in
6compat5|6|7|8|9)
test "$with_android" != "" -a "$with_android" != "no" \
|| with_httpserver="yes";;
esac
fi
AC_PROG_INSTALL
AC_PROG_LN_S
TOP_BUILDDIR=`pwd`
JAVA=${JAVA-java}
JAVAC=${JAVAC-javac}
dnl needed to match _AM_DEPENDENCIES
JAVACFLAGS=${JAVACFLAGS--g}
case "$JAVA_SOURCE" in
6compat5) JAVACFLAGS="${JAVACFLAGS} -target 1.5 -source 1.5" ;;
esac
filesep='/'
# Partly for compatibility (--enable/--disable-servlet was the old option);
# partly to allow --with-servlet=path-to-jar --disable-servlet.
# we essentially default enable-servlet to with-servlet. But we don't
# want to clutter up configure --help with --enable-servlet.
enable_servlet=${enable_servlet-${with_servlet}}
# Windows has a non-suitable find command.
AC_CACHE_CHECK([for Posix find command], [ac_cv_path_FIND],
[AC_PATH_PROGS_FEATURE_CHECK([FIND], [find],
[[findout=`$ac_path_FIND . -maxdepth 0 -type d -exec echo '{}' ';'`
test "x$findout" = x"." \
&& ac_cv_path_FIND=$ac_path_FIND ac_path_FIND_found=:]],
[AC_MSG_ERROR([could not find Posix find])])])
AC_SUBST([FIND], [$ac_cv_path_FIND])
AM_CONDITIONAL(ENABLE_ECHO2, test "$enable_echo2" = "yes")
AM_CONDITIONAL(WITH_ANDROID,
test "$with_android" != "" -a "$with_android" != "no")
AM_CONDITIONAL(ENABLE_BRL, test "$enable_brl" = "yes")
AM_CONDITIONAL(ENABLE_JEMACS, test "$enable_jemacs" = "yes")
AM_CONDITIONAL(ENABLE_XQUERY, test "$enable_xquery" != "no")
AM_CONDITIONAL(ENABLE_XML, test "$enable_xml" = "yes")
AM_CONDITIONAL(ENABLE_SERVLET,
test "$enable_servlet" != "" -a "$enable_servlet" != "no")
AM_CONDITIONAL(WITH_SWING, test "$with_swing" != "no")
AM_CONDITIONAL(WITH_JLINE3,
test "$with_jline3" != "" -a "$with_jline3" != "no")
AM_CONDITIONAL(WITH_DOMTERM,
test "$with_domterm" != "" -a "$with_domterm" != "no")
AM_CONDITIONAL(WITH_JAVAFX,
test "$with_javafx" != "" -a "$with_javafx" != "no")
AM_CONDITIONAL(WITH_SWT, test "$with_swt" = "yes")
AM_CONDITIONAL(WITH_AWT, test "$with_awt" != "no")
AM_CONDITIONAL(WITH_SAX2, test "$with_sax2" != "no")
AM_CONDITIONAL(WITH_JAVAX_SCRIPT, test "$with_javax_script" = "yes")
AM_CONDITIONAL(WITH_HTTPSERVER, test "$with_httpserver" = "yes")
AM_CONDITIONAL(WITH_XQTS, test "$with_XQTS" != "" -a "$with_XQTS" != "no")
AM_CONDITIONAL(ENABLE_KAWA_FRONTEND, test "$enable_kawa_frontend" = "yes")
AM_CONDITIONAL(ON_WINDOWS, test "$CLASSPATH_SEPARATOR" = ";")
if test "$with_jline3" != "" -a "$with_jline3" != "no"
then WITH_JLINE_PATH="${with_jline3}"
fi
JEMACS_VERSION=`echo $VERSION | sed -e 's/^1/0/'`
BYTECODE_VERSION="$VERSION"
m4_include(config.classpath)
case ${with_sax2} in
yes) SAX2_PREPROCESS="+SAX2";;
no) SAX2_PREPROCESS="-SAX2";;
*) SAX2_PREPROCESS=""
esac
XQTS_PATH=${with_XQTS:-XQTS}
AC_SUBST(XQTS_PATH)
AC_SUBST(SAX2_PREPROCESS)
AC_SUBST(conf_classpath)
AC_SUBST(run_classpath)
AC_SUBST(CLASSPATH_SEPARATOR)
AC_SUBST(pathsep)
AC_SUBST(filesep)
AC_SUBST(WITH_SERVLET_ARG)
AC_SUBST(WITH_JAVAFX_ARG)
AC_SUBST(WITH_JLINE3)
AC_SUBST(WITH_JLINE_PATH)
AC_SUBST(WITH_DOMTERM_ARG)
AC_SUBST(JAVA)
AC_SUBST(JAVAC)
AC_SUBST(JAVACFLAGS)
#These don't do anything, because Make-rules can't contain autoconf
#substitutions. Perhaps fix when new automake is out.
AC_SUBST(TOP_BUILDDIR)
AC_SUBST(PACKAGE)
AC_SUBST(VERSION)
AC_SUBST(JEMACS_VERSION)
AC_SUBST(BYTECODE_VERSION)
if test -z "$KAWA_SHELL"; then
if test -f /bin/bash; then KAWA_SHELL=/bin/bash
elif test -f /bin/ksh; then KAWA_SHELL=/bin/ksh
else KAWA_SHELL=${CONFIG_SHELL-/bin/sh}
fi
fi
AC_SUBST(KAWA_SHELL)
Make_rules="$srcdir/Make-rules"
AC_SUBST_FILE(Make_rules)
AC_CONFIG_LINKS(
testsuite/scribble.html:testsuite/scribble.html.in)
AM_COND_IF([ENABLE_KAWA_FRONTEND],
[AC_CONFIG_SUBDIRS([bin])])
AC_CONFIG_FILES([Makefile gnu/bytecode/Makefile
gnu/Makefile gnu/kawa/servlet/Makefile
gnu/brl/Makefile gnu/kawa/brl/Makefile
kawa/lib/Makefile gnu/kawa/slib/Makefile
gnu/commonlisp/lisp/Makefile gnu/commonlisp/testsuite/Makefile
gnu/jemacs/lisp/Makefile gnu/jemacs/testsuite/Makefile
gnu/q2/testsuite/Makefile
gnu/xquery/testsuite/Makefile
gnu/kawa/android/Makefile
gnu/kawa/javafx/Makefile
doc/Makefile testsuite/Makefile
bin/kawa.bat])
AC_CONFIG_FILES([bin/kawa.sh],[chmod +x bin/kawa.sh])
AC_CONFIG_FILES([bin/qexo],[chmod +x bin/qexo])
AC_OUTPUT