summaryrefslogtreecommitdiff
path: root/configure.in
blob: 0f862037832a2e4e9fff661153ea6bf54bac8391 (plain)
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
dnl Process this file with autoconf to produce a configure script.

AC_INIT(native/java.net/javanet.c)
AC_CANONICAL_HOST

PACKAGE="classpath"
VERSION="0.0"
LIBVERSION="0:0"
AC_SUBST(PACKAGE)
AC_SUBST(VERSION)
AC_SUBST(LIBVERSION)
AM_INIT_AUTOMAKE(${PACKAGE}, ${VERSION})

# this file is empty, is this supposed to be here? -gcb
#AM_CONFIG_HEADER(native/config.h)

AC_PREFIX_DEFAULT(/usr/local/classpath)

dnl Initialize libtool
AM_PROG_LIBTOOL

dnl required if SUBDIRS is used
AC_PROG_MAKE_SET

dnl Checks for programs.
dnl AC_PROG_CXX
AC_PROG_AWK
AC_PROG_CC
AC_PROG_CPP
AC_PROG_INSTALL
AC_PROG_LN_S
AC_HEADER_STDC
AC_CHECK_HEADERS(unistd.h)
AC_C_CONST
AC_CHECK_FUNCS(gethostname socket strerror fork pipe execve)

dnl guile checks - shouldn't need now that mauve exists
dnl GUILE_FLAGS

dnl Initialize maintainer mode
dnl AM_MAINTAINER_MODE

# We want warnings, lots of warnings :-)
if eval "test x$GCC = xyes"; then
  JAPHAR_GREP_CFLAGS(-Wall, [
    CFLAGS="$CFLAGS -Wall"
  ])
  JAPHAR_GREP_CFLAGS(-Wstrict-prototypes, [
    CFLAGS="$CFLAGS -Wstrict-prototypes"
  ])
  JAPHAR_GREP_CFLAGS(-Wmissing-prototypes, [
    CFLAGS="$CFLAGS -Wmissing-prototypes"
  ])
  JAPHAR_GREP_CFLAGS(-Wmissing-declarations, [
    CFLAGS="$CFLAGS -Wmissing-declarations"
  ])
  JAPHAR_GREP_CFLAGS(-Wreturn-type, [
    CFLAGS="$CFLAGS -Wreturn-type"                    
  ])
  JAPHAR_GREP_CFLAGS(-Wcast-align, [
    CFLAGS="$CFLAGS -Wcast-align"
  ])
  JAPHAR_GREP_CFLAGS(-pedantic, [
    CFLAGS="$CFLAGS -pedantic"
  ])
fi

dnl Check for cthreads, w32 threads, pthreads
dnl CLASSPATH_CHECK_THREADS

dnl --with-japhar
CLASSPATH_CHECK_JAPHAR

dnl --with-kaffe
CLASSPATH_CHECK_KAFFE

dnl if no jvm yet defined, check for japhar
if test -z "$JVM" || test "$JVM" = "no"; then
  CLASSPATH_INTERNAL_CHECK_JAPHAR
fi
AC_MSG_CHECKING(for defined vm)
if test -z "$JVM" || test "$JVM" = "no"; then
  AC_MSG_ERROR(no: try --with-japhar)
else
  AC_MSG_RESULT(yes)
fi

AC_ARG_WITH(java,
  [  --with-java		  specify path to a java-like program ],
  [
    if test ${withval} != "" || test ${withval} != "yes" || test ${withval} != "no"; then
      # set javac to user input value
      AC_MSG_CHECKING(for java)
      USER_JABBA=${withval}
      AC_SUBST(USER_JABBA)
      AC_MSG_RESULT(${withval})
      AM_CONDITIONAL(USER_SPECIFIED_JABBA, test x = x)
    fi
  ])

AC_ARG_WITH(classlib,
  [  --with-classlib		  specify path to a classes.zip like file ],
  [
    if test ${withval} != "" || test ${withval} != "yes" || test ${withval} != "no"; then
      # set javac to user input value
      AC_MSG_CHECKING(for classlib)
      USER_CLASSLIB=${withval}
      AC_SUBST(USER_CLASSLIB)
      AC_MSG_RESULT(${withval})
      AM_CONDITIONAL(USER_SPECIFIED_CLASSLIB, test x = x)
    fi
  ])

dnl Since most people won't have JavaDeps or Jikes to compute dependencies
dnl on the Java source files.
AC_ARG_ENABLE(maintainer-build,
[  --enable-maintainer-build	java dependency computation [default=no]],
[case "${enableval}" in 
  yes) 
    maintainer_debug=true
    ;;
  no)  maintainer_debug=false ;;
  *) AC_MSG_ERROR(bad value ${enableval} for --enable-maintainer-build) ;;
esac],
[maintainer_debug=false])
AM_CONDITIONAL(MAINTAINER_BUILD, test x$maintainer_debug = xtrue)

dnl java dependency creation
AC_ARG_WITH(jdeps,
[  --with-jdeps		  specify location of JavaDeps],
[
  if test ${withval} = "yes" || test ${withval} = ""; then
    AC_PATH_PROG(JAVADEPS, jdeps, "", $PATH)
  else
    AC_PATH_PROG(JAVADEPS, jdeps, "", $PATH:${withval})
  fi
],
[
  if test x"$maintainer_debug" = xtrue; then
    AC_PATH_PROG(JAVADEPS, jdeps, "", $PATH)
  fi
])

AC_PATH_PROG(SH, sh)
AC_PATH_PROG(FIND, find)

AC_OUTPUT(Makefile
doc/Makefile
gnu/java/awt/peer/gtk/Makefile
gnu/java/awt/peer/Makefile
gnu/java/awt/Makefile
gnu/java/io/decode/Makefile
gnu/java/io/Makefile
gnu/java/io/encode/Makefile
gnu/java/lang/reflect/Makefile
gnu/java/lang/Makefile
gnu/java/Makefile
gnu/java/beans/editors/Makefile
gnu/java/beans/info/Makefile
gnu/java/beans/Makefile
gnu/java/locale/Makefile
gnu/java/net/content/text/Makefile
gnu/java/net/content/Makefile
gnu/java/net/Makefile
gnu/java/net/protocol/file/Makefile
gnu/java/net/protocol/http/Makefile
gnu/java/net/protocol/Makefile
gnu/java/security/Makefile
gnu/Makefile
gnu/tools/serialver/Makefile
gnu/tools/Makefile
java/beans/Makefile
java/io/Makefile
java/lang/reflect/Makefile
java/lang/Makefile
java/Makefile
java/math/Makefile
java/net/Makefile
java/security/acl/Makefile
java/security/interfaces/Makefile
java/security/Makefile
java/text/Makefile
java/util/Makefile
native/Makefile
native/java.io/Makefile
native/java.lang/Makefile
native/java.lang.reflect/Makefile
native/java.net/Makefile
native/lib/Makefile
resource/java/util/Makefile
resource/java/Makefile
resource/Makefile
vm/reference/gnu/vm/stack/Makefile
vm/reference/gnu/vm/Makefile
vm/reference/gnu/Makefile
vm/reference/java/lang/reflect/Makefile
vm/reference/java/lang/Makefile
vm/reference/java/Makefile
vm/reference/Makefile
vm/Makefile
lib/deps.sh
lib/gen-classlist.sh
lib/Makefile)

AC_OUTPUT_COMMANDS(chmod 755 lib/deps.sh)
AC_OUTPUT_COMMANDS(chmod 755 lib/gen-classlist.sh)