21 |
dnl at which time we'll have to be more anal about such things |
dnl at which time we'll have to be more anal about such things |
22 |
dnl ----------------------------------------------------------- |
dnl ----------------------------------------------------------- |
23 |
AC_SUBST(LIBVERSION, "0:0:0") |
AC_SUBST(LIBVERSION, "0:0:0") |
24 |
CLASSPATH_MODULE="-module -version-info ${LIBVERSION}" |
CLASSPATH_MODULE="-module -version-info ${LIBVERSION} -no-undefined" |
25 |
AC_SUBST(CLASSPATH_MODULE) |
AC_SUBST(CLASSPATH_MODULE) |
26 |
|
|
27 |
AC_PREREQ(2.59) |
AC_PREREQ(2.59) |
43 |
AM_CONDITIONAL(CREATE_JNI_LIBRARIES, test "x${COMPILE_JNI}" = xyes) |
AM_CONDITIONAL(CREATE_JNI_LIBRARIES, test "x${COMPILE_JNI}" = xyes) |
44 |
|
|
45 |
dnl ----------------------------------------------------------- |
dnl ----------------------------------------------------------- |
46 |
dnl Enable CNI libraries (disabled by default) |
dnl Whether to compile with -Werror or not (enabled by default) |
47 |
dnl ----------------------------------------------------------- |
dnl ----------------------------------------------------------- |
48 |
AC_ARG_ENABLE([cni], |
AC_ARG_ENABLE([Werror], |
49 |
[AS_HELP_STRING(--enable-cni,compile CNI source [default=no])], |
[AS_HELP_STRING(--disable-Werror,whether to compile C code with -Werror which turns any compiler warning into a compilation failure [default=yes])], |
50 |
[case "${enableval}" in |
[case "${enableval}" in |
51 |
yes) COMPILE_CNI=yes; COMPILE_JAVA=yes ;; |
yes) ENABLE_WERROR=yes ;; |
52 |
no) COMPILE_CNI=no ;; |
no) ENABLE_WERROR=no ;; |
53 |
*) COMPILE_CNI=yes; COMPILE_JAVA=yes ;; |
*) ENABLE_WERROR=yes ;; |
54 |
esac], |
esac], |
55 |
[COMPILE_CNI=no]) |
[ENABLE_WERROR=yes]) |
|
AM_CONDITIONAL(CREATE_CNI_LIBRARIES, test "x${COMPILE_CNI}" = xyes) |
|
56 |
|
|
57 |
dnl ----------------------------------------------------------- |
dnl ----------------------------------------------------------- |
58 |
dnl GTK native peer (enabled by default) |
dnl GTK native peer (enabled by default) |
59 |
dnl ----------------------------------------------------------- |
dnl ----------------------------------------------------------- |
60 |
AC_ARG_ENABLE([gtk-peer], |
AC_ARG_ENABLE([gtk-peer], |
61 |
[AS_HELP_STRING(--disable-gtk-peer,compile GTK native peers,disabled by --disable-jni [default=yes])], |
[AS_HELP_STRING(--disable-gtk-peer,compile GTK native peers (disabled by --disable-jni) [default=yes])], |
62 |
[case "${enableval}" in |
[case "${enableval}" in |
63 |
yes) COMPILE_GTK_PEER=yes ;; |
yes) COMPILE_GTK_PEER=yes ;; |
64 |
no) COMPILE_GTK_PEER=no ;; |
no) COMPILE_GTK_PEER=no ;; |
118 |
dnl Checking sizeof void * is needed for fdlibm to work properly on ppc64, |
dnl Checking sizeof void * is needed for fdlibm to work properly on ppc64, |
119 |
dnl at least. |
dnl at least. |
120 |
AC_CHECK_SIZEOF(void *) |
AC_CHECK_SIZEOF(void *) |
121 |
|
|
122 |
|
dnl Checking for endianess. |
123 |
|
AC_C_BIGENDIAN |
124 |
|
|
125 |
dnl We check for sys/filio.h because Solaris 2.5 defines FIONREAD there. |
dnl We check for sys/filio.h because Solaris 2.5 defines FIONREAD there. |
126 |
dnl On that system, sys/ioctl.h will not include sys/filio.h unless |
dnl On that system, sys/ioctl.h will not include sys/filio.h unless |
127 |
dnl BSD_COMP is defined; just including sys/filio.h is simpler. |
dnl BSD_COMP is defined; just including sys/filio.h is simpler. |
172 |
dnl FIXME - does not allow cross compiling |
dnl FIXME - does not allow cross compiling |
173 |
AC_C_BIGENDIAN |
AC_C_BIGENDIAN |
174 |
|
|
175 |
dnl We want warnings, lots of warnings :-) |
dnl When using gcc we want warnings, lots of warnings :-) |
|
AM_CFLAGS= |
|
176 |
if test "x${GCC}" = xyes; then |
if test "x${GCC}" = xyes; then |
177 |
dnl We want ISO C90 pedantic ansi, but with longlong (jlong) support |
dnl We want ISO C90 pedantic ansi, but with longlong (jlong) support |
178 |
dnl and modern POSIX and BSD C library functions/prototypes. |
dnl and modern POSIX and BSD C library functions/prototypes. |
179 |
AM_CFLAGS='-ansi -pedantic -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wall -Wno-long-long -D_BSD_SOURCE ' |
|
180 |
|
dnl Warning flags for (almost) everybody. |
181 |
|
dnl Should probably be configurable |
182 |
|
WARNING_CFLAGS='-pedantic -W -Wall -Wmissing-declarations -Wwrite-strings -Wmissing-prototypes -Wno-long-long' |
183 |
|
AC_SUBST(WARNING_CFLAGS) |
184 |
|
|
185 |
|
dnl Strict warning flags which not every module uses. |
186 |
|
dnl Should probably be configurable. |
187 |
|
STRICT_WARNING_CFLAGS=-Wstrict-prototypes |
188 |
|
AC_SUBST(STRICT_WARNING_CFLAGS) |
189 |
|
|
190 |
|
dnl Whether or not to add -Werror, also not used by all modueles. |
191 |
|
dnl Can be configured by --disable-Werror |
192 |
|
ERROR_CFLAGS= |
193 |
|
if test "x${ENABLE_WERROR}" = xyes; then |
194 |
|
ERROR_CFLAGS='-Werror' |
195 |
|
fi |
196 |
|
AC_SUBST(ERROR_CFLAGS) |
197 |
fi |
fi |
|
AC_SUBST(AM_CFLAGS) |
|
198 |
|
|
199 |
dnl Check for AWT related gthread/gtk/libart_lgpl |
dnl Check for AWT related gthread/gtk/libart_lgpl |
200 |
if test "x${COMPILE_GTK_PEER}" = xyes; then |
if test "x${COMPILE_GTK_PEER}" = xyes; then |
218 |
|
|
219 |
dnl ----------------------------------------------------------- |
dnl ----------------------------------------------------------- |
220 |
dnl Add the include files for the native abstraction layer. |
dnl Add the include files for the native abstraction layer. |
221 |
|
dnl Used by AM_CPPFLAGS in the different modules. |
222 |
dnl ----------------------------------------------------------- |
dnl ----------------------------------------------------------- |
223 |
AM_CPPFLAGS="-I\$(top_srcdir)/include -I\$(top_srcdir)/native/jni/classpath" |
CLASSPATH_INCLUDES="-I\$(top_srcdir)/include -I\$(top_srcdir)/native/jni/classpath -I\$(top_srcdir)/native/target/Linux -I\$(top_srcdir)/native/target/generic" |
224 |
AM_CPPFLAGS="$AM_CPPFLAGS -I\$(top_srcdir)/native/target/Linux -I\$(top_srcdir)/native/target/generic" |
AC_SUBST(CLASSPATH_INCLUDES) |
|
AC_SUBST(AM_CPPFLAGS) |
|
225 |
|
|
226 |
dnl ----------------------------------------------------------- |
dnl ----------------------------------------------------------- |
227 |
if test "x${COMPILE_JNI}" = xyes; then |
if test "x${COMPILE_JNI}" = xyes; then |
278 |
dnl them. |
dnl them. |
279 |
dnl ----------------------------------------------------------- |
dnl ----------------------------------------------------------- |
280 |
AC_ARG_ENABLE([load-library], |
AC_ARG_ENABLE([load-library], |
281 |
[AS_HELP_STRING(--enable-load-library,enable to use JNI native methods [default=yes] |
[AS_HELP_STRING(--enable-load-library,enable to use JNI native methods [default=yes])], |
|
(disabled automatically using --enable-cni))], |
|
282 |
[case "${enableval}" in |
[case "${enableval}" in |
283 |
yes) INIT_LOAD_LIBRARY="true" ;; |
yes) INIT_LOAD_LIBRARY="true" ;; |
284 |
no) INIT_LOAD_LIBRARY="false" ;; |
no) INIT_LOAD_LIBRARY="false" ;; |
285 |
*) AC_MSG_ERROR(bad value ${enableval} for --enable-load-library) ;; |
*) AC_MSG_ERROR(bad value ${enableval} for --enable-load-library) ;; |
286 |
esac], |
esac], |
287 |
[ |
[INIT_LOAD_LIBRARY="true"]) |
|
if test "x${COMPILE_CNI}" = xyes; then |
|
|
INIT_LOAD_LIBRARY="false" |
|
|
else |
|
|
INIT_LOAD_LIBRARY="true" |
|
|
fi |
|
|
]) |
|
288 |
AC_SUBST(INIT_LOAD_LIBRARY) |
AC_SUBST(INIT_LOAD_LIBRARY) |
289 |
|
|
290 |
dnl ----------------------------------------------------------- |
dnl ----------------------------------------------------------- |
|
dnl Create a link to the VM specific files we're compiling with |
|
|
dnl ----------------------------------------------------------- |
|
|
if test "x${JVM_REFERENCE}" = x; then |
|
|
JVM_REFERENCE=reference |
|
|
fi |
|
|
ac_sources="vm/$JVM_REFERENCE" |
|
|
ac_dests="vm/current" |
|
|
while test -n "$ac_sources"; do |
|
|
set $ac_dests; ac_dest=$1; shift; ac_dests=$* |
|
|
set $ac_sources; ac_source=$1; shift; ac_sources=$* |
|
|
ac_config_links_2="$ac_config_links_2 $ac_dest:$ac_source" |
|
|
done |
|
|
AC_CONFIG_LINKS([$ac_config_links_2]) |
|
|
|
|
|
dnl ----------------------------------------------------------- |
|
291 |
dnl avoiding automake complaints |
dnl avoiding automake complaints |
292 |
dnl ----------------------------------------------------------- |
dnl ----------------------------------------------------------- |
293 |
REMOVE="" |
REMOVE="" |
345 |
include/Makefile |
include/Makefile |
346 |
native/Makefile |
native/Makefile |
347 |
native/fdlibm/Makefile |
native/fdlibm/Makefile |
|
native/cni/Makefile |
|
348 |
native/jni/Makefile |
native/jni/Makefile |
349 |
native/jni/classpath/Makefile |
native/jni/classpath/Makefile |
350 |
native/jni/java-io/Makefile |
native/jni/java-io/Makefile |