-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfigure.ac
120 lines (106 loc) · 2.63 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
dnl Process this file with automake to produce configure.
AC_INIT(cp-tools, 0.00-cvs, [cp-tools-discuss@gnu.org])
AM_INIT_AUTOMAKE
AC_CONFIG_MACRO_DIR([m4])
AC_DISABLE_STATIC
AM_PROG_GCJ
AC_PROG_LIBTOOL
dnl
dnl Compile natively with gcj?
dnl
AC_ARG_ENABLE([native],
[AS_HELP_STRING(--disable-native, disable generation of native binaries [[default=no]])],
[
if test "x${enableval}" = xno; then
enable_gcj=no
else
enable_gcj=yes
fi
],
[
enable_gcj=yes
]
)
if test "x${enable_gcj}" = xyes; then
if test "x${GCJ}" = xfalse; then
enable_gcj=no
echo "Native compilation disabled because gcj not found"
fi
fi
if test "x${enable_gcj}" = xno; then
AC_PROG_JAVAC
fi
AM_CONDITIONAL(ENABLE_GCJ_BINARY, test "x${enable_gcj}" = xyes)
AC_PROG_JAVA
AC_PROG_JAR
AC_CHECK_CLASSPATH
dnl Check if required jars are in $prefix/share/java and prepend it to the
dnl CLASSPATH.
if test -z $CLASSPATH
then
export CLASSPATH=.
else
export CLASSPATH=$CLASSPATH:.
fi
if test -d /usr/share/classpath
then
classpath_prefix=/usr
elif test -d /usr/classpath/share/classpath
then
classpath_prefix=/usr/classpath
elif test -d /usr/local/share/classpath
then
classpath_prefix=/usr/local
elif test -d /usr/local/classpath/share/classpath
then
classpath_prefix=/usr/local/classpath
fi
dnl
dnl GNU bytecode library
dnl
AC_ARG_WITH([gnu-bytecode],
[AS_HELP_STRING(--with-gnu-bytecode,use gnu.bytecode [[default=yes]])],
[
if test "x${withval}" != xno; then
with_gnubytecode=yes
else
with_gnubytecode=no
fi
],
[
with_gnubytecode=yes
]
)
AM_CONDITIONAL(USE_GNUBYTECODE, test "x${with_gnubytecode}" = xyes)
if test "x${with_gnubytecode}" = xyes
then
for path in /usr /usr/local; do
AC_CHECK_FILE([$path/share/java/bytecode.jar],
AC_CLASSPATH_ADD([$path/share/java/bytecode.jar])
BYTECODE_JAR=$path/share/java/bytecode.jar
export BYTECODE_JAR
)
done
test -d src || mkdir src
test -d src/jars || mkdir src/jars
cp -f ${BYTECODE_JAR} src/jars/
fi
AC_SUBST(CLASSPATH)
if test "x${with_gnubytecode}" = xyes
then
AC_CHECK_RQRD_CLASS([gnu.bytecode.ClassFileInput])
fi
AC_CHECK_RQRD_CLASS([javax.xml.transform.Transformer])
AC_CONFIG_FILES([Makefile])
if test "x${enable_gcj}" = xno; then
AC_CONFIG_FILES([bin/localegen bin/supplementgen])
AC_CONFIG_COMMANDS([localegen],[chmod 755 bin/localegen])
AC_CONFIG_COMMANDS([supplementgen],[chmod 755 bin/supplementgen])
if test "x${with_gnubytecode}" = xyes
then
AC_CONFIG_FILES([bin/gjavap bin/gjavah])
AC_CONFIG_COMMANDS([gjavap], [chmod 755 bin/gjavap])
AC_CONFIG_COMMANDS([gjavah], [chmod 755 bin/gjavah])
fi
fi
AC_OUTPUT