]> git.pld-linux.org Git - packages/libreoffice.git/blame - openoffice-allow-no-jdk.patch
- up
[packages/libreoffice.git] / openoffice-allow-no-jdk.patch
CommitLineData
43041813 1--- config_office/configure.in.orig 2003-09-22 11:14:29.000000000 -0700
2+++ config_office/configure.in 2003-09-22 11:33:19.000000000 -0700
3@@ -1124,66 +1124,79 @@
4 dnl ===================================================================
5 dnl Checks for JDK.
6 dnl ===================================================================
7-JAVA_HOME=; export JAVA_HOME
8-if test -z "$with_jdk_home"; then
9- AC_PATH_PROG(JAVAC, javac)
10- AC_PATH_PROG(JAVA, java)
11-else
12- _javac_path="$with_jdk_home/bin/javac"
13- dnl Check if there is a java compiler at all.
14- if test -x "$_javac_path"; then
15- JAVAC=$_javac_path
16- else
17- AC_MSG_ERROR([$_javac_path not found set with_jdk_home])
18+if test "$enable_java" != "no"; then
19+ JAVA_HOME=; export JAVA_HOME
20+ if test -z "$with_jdk_home"; then
21+ AC_PATH_PROG(JAVAC, javac)
22+ AC_PATH_PROG(JAVA, java)
23+ else
24+ _javac_path="$with_jdk_home/bin/javac"
25+ dnl Check if there is a java compiler at all.
26+ if test -x "$_javac_path"; then
27+ JAVAC=$_javac_path
28+ else
29+ AC_MSG_ERROR([$_javac_path not found set with_jdk_home])
30+ fi
31+
32+ _java_path="$with_jdk_home/bin/java"
33+ dnl Check if there is a java interpreter at all.
34+ if test -x "$_java_path"; then
35+ JAVA=$_java_path
36+ else
37+ AC_MSG_ERROR([$_java_path not found set with_jdk_home])
38+ fi
39 fi
40+ AC_MSG_CHECKING([the installed JDK])
41+ if test "$JAVA"; then
42
43- _java_path="$with_jdk_home/bin/java"
44- dnl Check if there is a java interpreter at all.
45- if test -x "$_java_path"; then
46- JAVA=$_java_path
47- else
48- AC_MSG_ERROR([$_java_path not found set with_jdk_home])
49- fi
50-fi
51-AC_MSG_CHECKING([the installed JDK])
52-if test "$JAVA"; then
53-
54- dnl java -version sends output to stderr!
55- if test `$JAVA -version 2>&1 | grep -c "Kaffe"` -gt 0; then
56-
57- dnl Kaffe specific tests
58- KAFFE_VER=`$JAVA -version 2>&1 | $EGREP " Version:" | $SED -r "s/.* Version: ([[0-9\.]]*).*/\1/"`
59- if test -z "$KAFFE_VER"; then
60- AC_MSG_ERROR([looks like Kaffe but version detection failed])
61- fi
62- _kaffe_ver=`echo "$KAFFE_VER" | $AWK -F. '{ print (($1 * 100) + $2) * 100 + $3;}'`
63- if test "$_kaffe_ver" -lt 10100; then
64- AC_MSG_ERROR([Kaffe is too old ($KAFFE_VER - $_kaffe_ver), you need at least 1.1.0])
65- fi
66- JDK=kaffe
67-
68- dnl TODO: define some project exclusion variables
69-
70- AC_MSG_RESULT([checked (Kaffe $KAFFE_VER)])
71- AC_MSG_WARN([EXPERIMENTAL: Kaffe is not a full JDK replacement - some projects will fail to compile])
72- echo "EXPERIMENTAL: Kaffe is not a full JDK replacement - some projects will fail to compile" >>warn
73- else
74-
75- dnl SUN JDK specific tests
76- _jdk=`$JAVAC -J-version 2>&1 | $AWK -F'"' '{ print \$2 }' | $SED s/[[-A-Za-z]]*//`
77- _jdk_ver=`echo "$_jdk" | $AWK -F. '{ print (($1 * 100) + $2) * 100 + $3;}'`
78-
79- if test "$_jdk_ver" -lt 10300; then
80- AC_MSG_ERROR([JDK is too old, you need at least 1.3])
81- fi
82- AC_MSG_RESULT([checked (JDK $_jdk)])
83+ dnl java -version sends output to stderr!
84+ if test `$JAVA -version 2>&1 | grep -c "Kaffe"` -gt 0; then
85+
86+ dnl Kaffe specific tests
87+ KAFFE_VER=`$JAVA -version 2>&1 | $EGREP " Version:" | $SED -r "s/.* Version: ([[0-9\.]]*).*/\1/"`
88+ if test -z "$KAFFE_VER"; then
89+ AC_MSG_ERROR([looks like Kaffe but version detection failed])
90+ fi
91+ _kaffe_ver=`echo "$KAFFE_VER" | $AWK -F. '{ print (($1 * 100) + $2) * 100 + $3;}'`
92+ if test "$_kaffe_ver" -lt 10100; then
93+ AC_MSG_ERROR([Kaffe is too old ($KAFFE_VER - $_kaffe_ver), you need at least 1.1.0])
94+ fi
95+ JDK=kaffe
96+
97+ dnl TODO: define some project exclusion variables
98+
99+ AC_MSG_RESULT([checked (Kaffe $KAFFE_VER)])
100+ AC_MSG_WARN([EXPERIMENTAL: Kaffe is not a full JDK replacement - some projects will fail to compile])
101+ echo "EXPERIMENTAL: Kaffe is not a full JDK replacement - some projects will fail to compile" >>warn
102+ else
103+
104+ dnl SUN JDK specific tests
105+ _jdk=`$JAVAC -J-version 2>&1 | $AWK -F'"' '{ print \$2 }' | $SED s/[[-A-Za-z]]*//`
106+ _jdk_ver=`echo "$_jdk" | $AWK -F. '{ print (($1 * 100) + $2) * 100 + $3;}'`
107+
108+ if test "$_jdk_ver" -lt 10300; then
109+ AC_MSG_ERROR([JDK is too old, you need at least 1.3])
110+ fi
111+ AC_MSG_RESULT([checked (JDK $_jdk)])
112+ fi
113+ JAVA_HOME=`echo $JAVAC | $SED -n "s,//*bin//*javac,,p"`
114+ else
115+ AC_MSG_ERROR([JAVA not found. You need at least jdk-1.3])
116 fi
117- JAVA_HOME=`echo $JAVAC | $SED -n "s,//*bin//*javac,,p"`
118+ dnl xsltproc not needed with JDK present.
119+ XSLTPROC=NO_XSLTPROC
120 else
121- AC_MSG_ERROR([JAVA not found. You need at least jdk-1.3])
122+ dnl Java disabled
123+ JAVA_HOME=NO_JAVA_HOME ; export JAVA_HOME
124+ dnl Check for xsltproc
125+ AC_PATH_PROG(XSLTPROC, xsltproc, no)
126+ if test "$XSLTPROC" = "no"; then
127+ AC_MSG_ERROR([xsltproc is required when building with --disable-java.])
128+ fi
129 fi
130 AC_SUBST(JAVA_HOME)
131 AC_SUBST(JDK)
132+AC_SUBST(XSLTPROC)
133
134 dnl ===================================================================
135 dnl Checks for specific files.
136--- config_office/set_soenv.in.orig 2003-09-22 11:27:24.000000000 -0700
137+++ config_office/set_soenv.in 2003-09-22 11:30:33.000000000 -0700
138@@ -1359,6 +1359,7 @@
139 if ( '@JDK@' ne '' )
140 { ToFile( "JDK", "@JDK@", "e" );
141 }
142+ToFile( "XSLTPROC", "@XSLTPROC@", "e" );
143 ToFile( "ANT_HOME", "@ANT_HOME@", "e" );
144 ToFile( "JDKLIB", $JAVA_LIB, "e" );
145 ToFile( "STLPORT4", $STLPORT4, "e" );
This page took 0.078705 seconds and 4 git commands to generate.