annotate GEMBASSY-1.0.3/m4/java.m4 @ 0:8300eb051bea draft

Initial upload
author ktnyt
date Fri, 26 Jun 2015 05:19:29 -0400
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
1 dnl -*- Autoconf -*-
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
2 dnl @synopsis CHECK_JAVA()
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
3 dnl
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
4 dnl Need to specify --with-java and --with-javaos
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
5 dnl @author Alan Bleasby
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
6 dnl
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
7 dnl This macro calls:
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
8 dnl
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
9 dnl AC_SUBST([JAVA_CFLAGS])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
10 dnl AC_SUBST([JAVA_CPPFLAGS])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
11 dnl AC_SUBST([JAVA_LDFLAGS])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
12 dnl
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
13 dnl AM_CONDITIONAL([JAVA_BUILD], ...)
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
14 dnl
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
15 dnl And sets:
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
16 dnl
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
17 dnl AC_DEFINE([HAVE_JAVA], ...)
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
18 dnl
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
19 dnl AC_PATH_PROG([ANT], ...)
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
20 dnl AC_PATH_PROG([JAR], ...)
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
21 dnl AC_PATH_PROG([JAVA], ...)
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
22 dnl AC_PATH_PROG([JAVAC], ...)
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
23
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
24 AC_DEFUN([CHECK_JAVA],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
25 [
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
26 JAVA_CFLAGS=""
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
27 JAVA_CPPFLAGS=""
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
28 JAVA_LDFLAGS=""
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
29
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
30 have_java="yes"
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
31 auth_java=""
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
32
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
33 AC_MSG_CHECKING([for Java JNI])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
34
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
35 AC_ARG_WITH([java],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
36 [AS_HELP_STRING([--with-java@<:@=ARG@:>@],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
37 [root directory path of Java installation])],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
38 [
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
39 AC_MSG_RESULT([${withval}])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
40 AS_IF([test "x${withval}" = "xno"], [have_java="no"])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
41 ],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
42 [
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
43 AC_MSG_RESULT([no])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
44 have_java="no"
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
45 ])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
46
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
47 AS_IF([test "x${have_java}" = "xyes"],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
48 [
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
49 # If specified, the Java JNI include directory has to exist.
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
50 AS_IF([test -d ${with_java}],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
51 [AS_VAR_SET([JAVA_CPPFLAGS], ["-I${withval}"])],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
52 [
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
53 have_java="no"
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
54 AC_MSG_ERROR([Java include directory ${withval} does not exist])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
55 ])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
56 ])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
57
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
58 AC_MSG_CHECKING([for Java JNI OS])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
59
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
60 AC_ARG_WITH([javaos],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
61 [AS_HELP_STRING([--with-javaos@<:@=ARG@:>@],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
62 [root directory path of Java OS include])],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
63 [
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
64 AC_MSG_RESULT([${withval}])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
65
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
66 AS_IF([test "x${withval}" != "xno"],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
67 [
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
68 # If specified, the Java JNI OS include directory has to exist.
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
69 AS_IF([test "x${have_java}" = "xyes" && test -d ${withval}],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
70 [AS_VAR_APPEND([JAVA_CPPFLAGS], [" -I${withval}"])],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
71 [
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
72 have_java="no"
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
73 AC_MSG_ERROR([Java OS include directory ${withval} does not exist])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
74 ])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
75 ])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
76 ],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
77 [
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
78 AC_MSG_RESULT([no])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
79 ])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
80
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
81 # Authorisation type
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
82
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
83 AC_MSG_CHECKING([for authorisation type])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
84
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
85 AC_ARG_WITH([auth],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
86 [AS_HELP_STRING([--with-auth@<:@=ARG@:>@],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
87 [authorisation mechanism for Jemboss server @<:@default=PAM@:>@])],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
88 [
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
89 AS_IF([test "x${withval}" != "xno"],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
90 [
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
91 AC_MSG_RESULT([yes])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
92
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
93 AS_CASE([${withval}],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
94 [yes],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
95 [
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
96 auth_java="PAM"
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
97 AC_CHECK_LIB([pam], [main],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
98 [AS_VAR_APPEND([JAVA_LDFLAGS], [" -lpam"])])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
99 ],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
100 [pam],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
101 [
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
102 auth_java="PAM"
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
103 AC_CHECK_LIB([pam], [main],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
104 [AS_VAR_APPEND([JAVA_LDFLAGS], [" -lpam"])])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
105 ],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
106 [shadow],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
107 [
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
108 auth_java="N_SHADOW"
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
109 AC_CHECK_LIB([crypy], [main],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
110 [AS_VAR_APPEND([JAVA_LDFLAGS], [" -lcrypt"])])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
111 ],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
112 [rshadow],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
113 [
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
114 auth_java="R_SHADOW"
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
115 AC_CHECK_LIB([crypy], [main],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
116 [AS_VAR_APPEND([JAVA_LDFLAGS], [" -lcrypt"])])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
117 ],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
118 [noshadow],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
119 [auth_java="NO_SHADOW"],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
120 [rnoshadow],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
121 [auth_java="RNO_SHADOW"],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
122 [aixshadow],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
123 [auth_java="AIX_SHADOW"],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
124 [hpuxshadow],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
125 [auth_java="HPUX_SHADOW"])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
126 ],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
127 [AC_MSG_RESULT([no])])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
128 ],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
129 [AC_MSG_RESULT([no])])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
130
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
131 AS_IF([test -n "${auth_java}"],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
132 [AS_VAR_APPEND([JAVA_CPPFLAGS], [" -D${auth_java}"])],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
133 [AS_VAR_APPEND([JAVA_CPPFLAGS], [" -DNO_AUTH"])])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
134
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
135 # Threading type
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
136
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
137 AC_MSG_CHECKING([for threading type])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
138
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
139 AC_ARG_WITH([thread],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
140 [AS_HELP_STRING([--with-thread@<:@=ARG@:>@],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
141 [thread type @<:@default=linux@:>@])],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
142 [
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
143 AS_IF([test "x${withval}" != "xno"],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
144 [
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
145 AC_MSG_RESULT([yes])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
146
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
147 AS_CASE([${withval}],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
148 [yes],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
149 [
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
150 AS_VAR_APPEND([JAVA_CPPFLAGS], [" -D_REENTRANT"])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
151 AS_VAR_APPEND([JAVA_LDFLAGS], [" -lpthread"])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
152 # AS_VAR_APPEND([LIBS], [" -lpthread"])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
153 ],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
154 [freebsd],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
155 [
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
156 AS_VAR_APPEND([JAVA_CPPFLAGS], [" -D_THREAD_SAFE"])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
157 AS_VAR_APPEND([JAVA_LDFLAGS], [" -pthread"])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
158 # AS_VAR_APPEND([LIBS], [" -lc_r"])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
159 ],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
160 [linux],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
161 [
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
162 AS_VAR_APPEND([JAVA_CPPFLAGS], [" -D_REENTRANT"])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
163 AS_VAR_APPEND([JAVA_LDFLAGS], [" -lpthread"])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
164 # AS_VAR_APPEND([LIBS], [" -lpthread"])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
165 ],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
166 [solaris],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
167 [
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
168 AS_VAR_APPEND([JAVA_CPPFLAGS], [" -D_POSIX_C_SOURCE=199506L"])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
169 AS_VAR_APPEND([JAVA_LDFLAGS], [" -lpthread"])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
170 # AS_VAR_APPEND([LIBS], [" -lpthread"])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
171 ],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
172 [macos],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
173 [
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
174 # AS_VAR_APPEND([JAVA_CPPFLAGS], [""])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
175 # AS_VAR_APPEND([JAVA_LDFLAGS], [" -lpthread"])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
176 # AS_VAR_APPEND([LIBS], [" -lpthread"])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
177 ],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
178 [hpux],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
179 [
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
180 AS_VAR_APPEND([JAVA_CFLAGS], [" -Ae +z"])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
181 AS_VAR_APPEND([JAVA CPPFLAGS], [" -DNATIVE -D_POSIX_C_SOURCE=199506L"])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
182 AS_VAR_APPEND([JAVA_LDFLAGS], [" -lpthread"])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
183 # AS_VAR_APPEND([LIBS], [" -lpthread"])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
184 ],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
185 [irix],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
186 [
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
187 # AS_VAR_APPEND([JAVA_CFLAGS], [""])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
188 AS_VAR_APPEND([JAVA_LDFLAGS], [" -lpthread"])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
189 AS_VAR_APPEND([LIBS], [" -lpthread"])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
190 ],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
191 [aix],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
192 [
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
193 AS_VAR_APPEND([JAVA_CPPFLAGS], [" -D_REENTRANT"])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
194 AS_VAR_APPEND([JAVA_LDFLAGS], [" -lpthread"])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
195 AS_VAR_APPEND([LIBS], [" -lpthread"])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
196 ],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
197 [osf],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
198 [
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
199 AS_VAR_APPEND([JAVA_CPPFLAGS], [" -D_REENTRANT -D_OSF_SOURCE"])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
200 AS_VAR_APPEND([JAVA_LDFLAGS], [" -lpthread"])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
201 AS_VAR_APPEND([LIBS], [" -lpthread"])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
202 ])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
203 ],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
204 [AC_MSG_RESULT([no])])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
205 ],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
206 [AC_MSG_RESULT([no])])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
207
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
208 # Test for programs ant, jar, java and javac.
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
209
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
210 AS_IF([test "x${have_java}" = "xyes"],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
211 [
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
212 AC_PATH_PROG([ANT], [ant], [no])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
213 AS_IF([test "x${ANT}" = "xno"], [have_java="no"])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
214
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
215 AC_PATH_PROG([JAR], [jar], [no])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
216 AS_IF([test "x${JAR}" = "xno"], [have_java="no"])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
217
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
218 AC_PATH_PROG([JAVA], [java], [no])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
219 AS_IF([test "x${JAVA}" = "xno"], [have_java="no"])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
220
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
221 AC_PATH_PROG([JAVAC], [javac], [no])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
222 AS_IF([test "x${JAVAC}" = "xno"], [have_java="no"])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
223 ])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
224
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
225 AS_IF([test "x${have_java}" = "xyes"],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
226 [
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
227 AC_DEFINE([HAVE_JAVA], [1],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
228 [Define to 1 if the Java Native Interface (JNI) is available.])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
229
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
230 ### FIXME: Append -DDEBIAN for the moment.
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
231 # Debian uses PAM service "ssh" instead of "login", see ajjava.c
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
232 # This could use AC_DEFINE() if no better option was avialable.
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
233 # Ultimately, this should be configurable via server configuration
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
234 # files.
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
235 AS_IF([test -f "/etc/debian_release" || test -f /etc/debian_version],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
236 [AS_VAR_APPEND([JAVA_CPPFLAGS], [" -DDEBIAN"])])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
237 ])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
238
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
239 AC_ARG_VAR([ANT], [Path to the Apache Ant make tool])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
240 AC_ARG_VAR([JAR], [Path to the Java archive tool])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
241 AC_ARG_VAR([JAVA], [Path to the Java application launcher])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
242 AC_ARG_VAR([JAVAC], [Path to the Java compiler])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
243
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
244 AC_SUBST([JAVA_CFLAGS])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
245 AC_SUBST([JAVA_CPPFLAGS])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
246 AC_SUBST([JAVA_LDFLAGS])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
247
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
248 AM_CONDITIONAL([JAVA_BUILD], [test "x${have_java}" = "xyes"])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
249 ])