common/autoconf/source-dirs.m4

changeset 839
174a54ce39c4
parent 795
64f52ef175a4
child 912
a667caba1e84
equal deleted inserted replaced
838:ec48d637778a 839:174a54ce39c4
23 # questions. 23 # questions.
24 # 24 #
25 25
26 AC_DEFUN_ONCE([SRCDIRS_SETUP_TOPDIRS], 26 AC_DEFUN_ONCE([SRCDIRS_SETUP_TOPDIRS],
27 [ 27 [
28 28 # Where are the sources. Any of these can be overridden
29 # Where are the sources. Any of these can be overridden 29 # using --with-override-corba and the likes.
30 # using --with-override-corba and the likes. 30 LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
31 LANGTOOLS_TOPDIR="$SRC_ROOT/langtools" 31 CORBA_TOPDIR="$SRC_ROOT/corba"
32 CORBA_TOPDIR="$SRC_ROOT/corba" 32 JAXP_TOPDIR="$SRC_ROOT/jaxp"
33 JAXP_TOPDIR="$SRC_ROOT/jaxp" 33 JAXWS_TOPDIR="$SRC_ROOT/jaxws"
34 JAXWS_TOPDIR="$SRC_ROOT/jaxws" 34 HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
35 HOTSPOT_TOPDIR="$SRC_ROOT/hotspot" 35 NASHORN_TOPDIR="$SRC_ROOT/nashorn"
36 NASHORN_TOPDIR="$SRC_ROOT/nashorn" 36 JDK_TOPDIR="$SRC_ROOT/jdk"
37 JDK_TOPDIR="$SRC_ROOT/jdk" 37 AC_SUBST(LANGTOOLS_TOPDIR)
38 AC_SUBST(LANGTOOLS_TOPDIR) 38 AC_SUBST(CORBA_TOPDIR)
39 AC_SUBST(CORBA_TOPDIR) 39 AC_SUBST(JAXP_TOPDIR)
40 AC_SUBST(JAXP_TOPDIR) 40 AC_SUBST(JAXWS_TOPDIR)
41 AC_SUBST(JAXWS_TOPDIR) 41 AC_SUBST(HOTSPOT_TOPDIR)
42 AC_SUBST(HOTSPOT_TOPDIR) 42 AC_SUBST(NASHORN_TOPDIR)
43 AC_SUBST(NASHORN_TOPDIR) 43 AC_SUBST(JDK_TOPDIR)
44 AC_SUBST(JDK_TOPDIR)
45 ]) 44 ])
46 45
47 46
48 AC_DEFUN_ONCE([SRCDIRS_SETUP_ALTERNATIVE_TOPDIRS], 47 AC_DEFUN_ONCE([SRCDIRS_SETUP_ALTERNATIVE_TOPDIRS],
49 [ 48 [
50 49
51 ############################################################################### 50 ###############################################################################
52 # 51 #
53 # Pickup additional source for a component from outside of the source root 52 # Pickup additional source for a component from outside of the source root
54 # or override source for a component. 53 # or override source for a component.
55 # 54 #
56 AC_ARG_WITH(add-source-root, [AS_HELP_STRING([--with-add-source-root], 55 AC_ARG_WITH(add-source-root, [AS_HELP_STRING([--with-add-source-root],
57 [for each and every source directory, look in this additional source root for 56 [for each and every source directory, look in this additional source root for
58 the same directory; if it exists and have files in it, include it in the build])]) 57 the same directory; if it exists and have files in it, include it in the build])])
59 58
60 AC_ARG_WITH(override-source-root, [AS_HELP_STRING([--with-override-source-root], 59 AC_ARG_WITH(override-source-root, [AS_HELP_STRING([--with-override-source-root],
61 [for each and every source directory, look in this override source root for 60 [for each and every source directory, look in this override source root for
62 the same directory; if it exists, use that directory instead and 61 the same directory; if it exists, use that directory instead and
63 ignore the directory in the original source root])]) 62 ignore the directory in the original source root])])
64 63
65 AC_ARG_WITH(adds-and-overrides, [AS_HELP_STRING([--with-adds-and-overrides], 64 AC_ARG_WITH(adds-and-overrides, [AS_HELP_STRING([--with-adds-and-overrides],
66 [use the subdirs 'adds' and 'overrides' in the specified directory as 65 [use the subdirs 'adds' and 'overrides' in the specified directory as
67 add-source-root and override-source-root])]) 66 add-source-root and override-source-root])])
68 67
69 if test "x$with_adds_and_overrides" != x; then 68 if test "x$with_adds_and_overrides" != x; then
70 with_add_source_root="$with_adds_and_overrides/adds" 69 with_add_source_root="$with_adds_and_overrides/adds"
71 with_override_source_root="$with_adds_and_overrides/overrides" 70 with_override_source_root="$with_adds_and_overrides/overrides"
72 fi 71 fi
73 72
74 if test "x$with_add_source_root" != x; then 73 if test "x$with_add_source_root" != x; then
75 if ! test -d $with_add_source_root; then 74 if ! test -d $with_add_source_root; then
76 AC_MSG_ERROR([Trying to use a non-existant add-source-root $with_add_source_root]) 75 AC_MSG_ERROR([Trying to use a non-existant add-source-root $with_add_source_root])
77 fi 76 fi
78 CURDIR="$PWD" 77 CURDIR="$PWD"
79 cd "$with_add_source_root" 78 cd "$with_add_source_root"
80 ADD_SRC_ROOT="`pwd`" 79 ADD_SRC_ROOT="`pwd`"
81 cd "$CURDIR" 80 cd "$CURDIR"
82 # Verify that the addon source root does not have any root makefiles. 81 # Verify that the addon source root does not have any root makefiles.
83 # If it does, then it is usually an error, prevent this. 82 # If it does, then it is usually an error, prevent this.
84 if test -f $with_add_source_root/langtools/makefiles/Makefile || \ 83 if test -f $with_add_source_root/langtools/makefiles/Makefile || \
85 test -f $with_add_source_root/langtools/make/Makefile; then 84 test -f $with_add_source_root/langtools/make/Makefile; then
86 AC_MSG_ERROR([Your add source root seems to contain a full langtools repo! An add source root should only contain additional sources.]) 85 AC_MSG_ERROR([Your add source root seems to contain a full langtools repo! An add source root should only contain additional sources.])
87 fi 86 fi
88 if test -f $with_add_source_root/corba/makefiles/Makefile || \ 87 if test -f $with_add_source_root/corba/makefiles/Makefile || \
89 test -f $with_add_source_root/corba/make/Makefile; then 88 test -f $with_add_source_root/corba/make/Makefile; then
90 AC_MSG_ERROR([Your add source root seems to contain a full corba repo! An add source root should only contain additional sources.]) 89 AC_MSG_ERROR([Your add source root seems to contain a full corba repo! An add source root should only contain additional sources.])
91 fi 90 fi
92 if test -f $with_add_source_root/jaxp/makefiles/Makefile || \ 91 if test -f $with_add_source_root/jaxp/makefiles/Makefile || \
93 test -f $with_add_source_root/jaxp/make/Makefile; then 92 test -f $with_add_source_root/jaxp/make/Makefile; then
94 AC_MSG_ERROR([Your add source root seems to contain a full jaxp repo! An add source root should only contain additional sources.]) 93 AC_MSG_ERROR([Your add source root seems to contain a full jaxp repo! An add source root should only contain additional sources.])
95 fi 94 fi
96 if test -f $with_add_source_root/jaxws/makefiles/Makefile || \ 95 if test -f $with_add_source_root/jaxws/makefiles/Makefile || \
97 test -f $with_add_source_root/jaxws/make/Makefile; then 96 test -f $with_add_source_root/jaxws/make/Makefile; then
98 AC_MSG_ERROR([Your add source root seems to contain a full jaxws repo! An add source root should only contain additional sources.]) 97 AC_MSG_ERROR([Your add source root seems to contain a full jaxws repo! An add source root should only contain additional sources.])
99 fi 98 fi
100 if test -f $with_add_source_root/hotspot/makefiles/Makefile || \ 99 if test -f $with_add_source_root/hotspot/makefiles/Makefile || \
101 test -f $with_add_source_root/hotspot/make/Makefile; then 100 test -f $with_add_source_root/hotspot/make/Makefile; then
102 AC_MSG_ERROR([Your add source root seems to contain a full hotspot repo! An add source root should only contain additional sources.]) 101 AC_MSG_ERROR([Your add source root seems to contain a full hotspot repo! An add source root should only contain additional sources.])
103 fi 102 fi
104 if test -f $with_add_source_root/nashorn/makefiles/Makefile || \ 103 if test -f $with_add_source_root/nashorn/makefiles/Makefile || \
105 test -f $with_add_source_root/nashorn/make/Makefile; then 104 test -f $with_add_source_root/nashorn/make/Makefile; then
106 AC_MSG_ERROR([Your add source root seems to contain a full nashorn repo! An add source root should only contain additional sources.]) 105 AC_MSG_ERROR([Your add source root seems to contain a full nashorn repo! An add source root should only contain additional sources.])
107 fi 106 fi
108 if test -f $with_add_source_root/jdk/makefiles/Makefile || \ 107 if test -f $with_add_source_root/jdk/makefiles/Makefile || \
109 test -f $with_add_source_root/jdk/make/Makefile; then 108 test -f $with_add_source_root/jdk/make/Makefile; then
110 AC_MSG_ERROR([Your add source root seems to contain a full JDK repo! An add source root should only contain additional sources.]) 109 AC_MSG_ERROR([Your add source root seems to contain a full JDK repo! An add source root should only contain additional sources.])
111 fi 110 fi
112 fi 111 fi
113 AC_SUBST(ADD_SRC_ROOT) 112 AC_SUBST(ADD_SRC_ROOT)
114 113
115 if test "x$with_override_source_root" != x; then 114 if test "x$with_override_source_root" != x; then
116 if ! test -d $with_override_source_root; then 115 if ! test -d $with_override_source_root; then
117 AC_MSG_ERROR([Trying to use a non-existant override-source-root $with_override_source_root]) 116 AC_MSG_ERROR([Trying to use a non-existant override-source-root $with_override_source_root])
118 fi 117 fi
119 CURDIR="$PWD" 118 CURDIR="$PWD"
120 cd "$with_override_source_root" 119 cd "$with_override_source_root"
121 OVERRIDE_SRC_ROOT="`pwd`" 120 OVERRIDE_SRC_ROOT="`pwd`"
122 cd "$CURDIR" 121 cd "$CURDIR"
123 if test -f $with_override_source_root/langtools/makefiles/Makefile || \ 122 if test -f $with_override_source_root/langtools/makefiles/Makefile || \
124 test -f $with_override_source_root/langtools/make/Makefile; then 123 test -f $with_override_source_root/langtools/make/Makefile; then
125 AC_MSG_ERROR([Your override source root seems to contain a full langtools repo! An override source root should only contain sources that override.]) 124 AC_MSG_ERROR([Your override source root seems to contain a full langtools repo! An override source root should only contain sources that override.])
126 fi 125 fi
127 if test -f $with_override_source_root/corba/makefiles/Makefile || \ 126 if test -f $with_override_source_root/corba/makefiles/Makefile || \
128 test -f $with_override_source_root/corba/make/Makefile; then 127 test -f $with_override_source_root/corba/make/Makefile; then
129 AC_MSG_ERROR([Your override source root seems to contain a full corba repo! An override source root should only contain sources that override.]) 128 AC_MSG_ERROR([Your override source root seems to contain a full corba repo! An override source root should only contain sources that override.])
130 fi 129 fi
131 if test -f $with_override_source_root/jaxp/makefiles/Makefile || \ 130 if test -f $with_override_source_root/jaxp/makefiles/Makefile || \
132 test -f $with_override_source_root/jaxp/make/Makefile; then 131 test -f $with_override_source_root/jaxp/make/Makefile; then
133 AC_MSG_ERROR([Your override source root seems to contain a full jaxp repo! An override source root should only contain sources that override.]) 132 AC_MSG_ERROR([Your override source root seems to contain a full jaxp repo! An override source root should only contain sources that override.])
134 fi 133 fi
135 if test -f $with_override_source_root/jaxws/makefiles/Makefile || \ 134 if test -f $with_override_source_root/jaxws/makefiles/Makefile || \
136 test -f $with_override_source_root/jaxws/make/Makefile; then 135 test -f $with_override_source_root/jaxws/make/Makefile; then
137 AC_MSG_ERROR([Your override source root seems to contain a full jaxws repo! An override source root should only contain sources that override.]) 136 AC_MSG_ERROR([Your override source root seems to contain a full jaxws repo! An override source root should only contain sources that override.])
138 fi 137 fi
139 if test -f $with_override_source_root/hotspot/makefiles/Makefile || \ 138 if test -f $with_override_source_root/hotspot/makefiles/Makefile || \
140 test -f $with_override_source_root/hotspot/make/Makefile; then 139 test -f $with_override_source_root/hotspot/make/Makefile; then
141 AC_MSG_ERROR([Your override source root seems to contain a full hotspot repo! An override source root should only contain sources that override.]) 140 AC_MSG_ERROR([Your override source root seems to contain a full hotspot repo! An override source root should only contain sources that override.])
142 fi 141 fi
143 if test -f $with_override_source_root/nashorn/makefiles/Makefile || \ 142 if test -f $with_override_source_root/nashorn/makefiles/Makefile || \
144 test -f $with_override_source_root/nashorn/make/Makefile; then 143 test -f $with_override_source_root/nashorn/make/Makefile; then
145 AC_MSG_ERROR([Your override source root seems to contain a full nashorn repo! An override source root should only contain sources that override.]) 144 AC_MSG_ERROR([Your override source root seems to contain a full nashorn repo! An override source root should only contain sources that override.])
146 fi 145 fi
147 if test -f $with_override_source_root/jdk/makefiles/Makefile || \ 146 if test -f $with_override_source_root/jdk/makefiles/Makefile || \
148 test -f $with_override_source_root/jdk/make/Makefile; then 147 test -f $with_override_source_root/jdk/make/Makefile; then
149 AC_MSG_ERROR([Your override source root seems to contain a full JDK repo! An override source root should only contain sources that override.]) 148 AC_MSG_ERROR([Your override source root seems to contain a full JDK repo! An override source root should only contain sources that override.])
150 fi 149 fi
151 fi 150 fi
152 AC_SUBST(OVERRIDE_SRC_ROOT) 151 AC_SUBST(OVERRIDE_SRC_ROOT)
153 152
154 ############################################################################### 153 ###############################################################################
155 # 154 #
156 # Override a repo completely, this is used for example when you have 3 small 155 # Override a repo completely, this is used for example when you have 3 small
157 # development sandboxes of the langtools sources and want to avoid having 3 full 156 # development sandboxes of the langtools sources and want to avoid having 3 full
158 # OpenJDK sources checked out on disk. 157 # OpenJDK sources checked out on disk.
159 # 158 #
160 # Assuming that the 3 langtools sandboxes are located here: 159 # Assuming that the 3 langtools sandboxes are located here:
161 # /home/fredrik/sandbox1/langtools 160 # /home/fredrik/sandbox1/langtools
162 # /home/fredrik/sandbox2/langtools 161 # /home/fredrik/sandbox2/langtools
163 # /home/fredrik/sandbox3/langtools 162 # /home/fredrik/sandbox3/langtools
164 # 163 #
165 # From the source root you create build subdirs manually: 164 # From the source root you create build subdirs manually:
166 # mkdir -p build1 build2 build3 165 # mkdir -p build1 build2 build3
167 # in each build directory run: 166 # in each build directory run:
168 # (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make) 167 # (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
169 # (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make) 168 # (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
170 # (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make) 169 # (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
171 # 170 #
172 171
173 AC_ARG_WITH(override-langtools, [AS_HELP_STRING([--with-override-langtools], 172 AC_ARG_WITH(override-langtools, [AS_HELP_STRING([--with-override-langtools],
174 [use this langtools dir for the build])]) 173 [use this langtools dir for the build])])
175 174
176 AC_ARG_WITH(override-corba, [AS_HELP_STRING([--with-override-corba], 175 AC_ARG_WITH(override-corba, [AS_HELP_STRING([--with-override-corba],
177 [use this corba dir for the build])]) 176 [use this corba dir for the build])])
178 177
179 AC_ARG_WITH(override-jaxp, [AS_HELP_STRING([--with-override-jaxp], 178 AC_ARG_WITH(override-jaxp, [AS_HELP_STRING([--with-override-jaxp],
180 [use this jaxp dir for the build])]) 179 [use this jaxp dir for the build])])
181 180
182 AC_ARG_WITH(override-jaxws, [AS_HELP_STRING([--with-override-jaxws], 181 AC_ARG_WITH(override-jaxws, [AS_HELP_STRING([--with-override-jaxws],
183 [use this jaxws dir for the build])]) 182 [use this jaxws dir for the build])])
184 183
185 AC_ARG_WITH(override-hotspot, [AS_HELP_STRING([--with-override-hotspot], 184 AC_ARG_WITH(override-hotspot, [AS_HELP_STRING([--with-override-hotspot],
186 [use this hotspot dir for the build])]) 185 [use this hotspot dir for the build])])
187 186
188 AC_ARG_WITH(override-nashorn, [AS_HELP_STRING([--with-override-nashorn], 187 AC_ARG_WITH(override-nashorn, [AS_HELP_STRING([--with-override-nashorn],
189 [use this nashorn dir for the build])]) 188 [use this nashorn dir for the build])])
190 189
191 AC_ARG_WITH(override-jdk, [AS_HELP_STRING([--with-override-jdk], 190 AC_ARG_WITH(override-jdk, [AS_HELP_STRING([--with-override-jdk],
192 [use this jdk dir for the build])]) 191 [use this jdk dir for the build])])
193 192
194 if test "x$with_override_langtools" != x; then 193 if test "x$with_override_langtools" != x; then
195 CURDIR="$PWD" 194 CURDIR="$PWD"
196 cd "$with_override_langtools" 195 cd "$with_override_langtools"
197 LANGTOOLS_TOPDIR="`pwd`" 196 LANGTOOLS_TOPDIR="`pwd`"
198 cd "$CURDIR" 197 cd "$CURDIR"
199 if ! test -f $LANGTOOLS_TOPDIR/makefiles/Makefile; then 198 if ! test -f $LANGTOOLS_TOPDIR/makefiles/Makefile; then
200 AC_MSG_ERROR([You have to override langtools with a full langtools repo!]) 199 AC_MSG_ERROR([You have to override langtools with a full langtools repo!])
201 fi 200 fi
202 AC_MSG_CHECKING([if langtools should be overridden]) 201 AC_MSG_CHECKING([if langtools should be overridden])
203 AC_MSG_RESULT([yes with $LANGTOOLS_TOPDIR]) 202 AC_MSG_RESULT([yes with $LANGTOOLS_TOPDIR])
204 fi 203 fi
205 if test "x$with_override_corba" != x; then 204 if test "x$with_override_corba" != x; then
206 CURDIR="$PWD" 205 CURDIR="$PWD"
207 cd "$with_override_corba" 206 cd "$with_override_corba"
208 CORBA_TOPDIR="`pwd`" 207 CORBA_TOPDIR="`pwd`"
209 cd "$CURDIR" 208 cd "$CURDIR"
210 if ! test -f $CORBA_TOPDIR/makefiles/Makefile; then 209 if ! test -f $CORBA_TOPDIR/makefiles/Makefile; then
211 AC_MSG_ERROR([You have to override corba with a full corba repo!]) 210 AC_MSG_ERROR([You have to override corba with a full corba repo!])
212 fi 211 fi
213 AC_MSG_CHECKING([if corba should be overridden]) 212 AC_MSG_CHECKING([if corba should be overridden])
214 AC_MSG_RESULT([yes with $CORBA_TOPDIR]) 213 AC_MSG_RESULT([yes with $CORBA_TOPDIR])
215 fi 214 fi
216 if test "x$with_override_jaxp" != x; then 215 if test "x$with_override_jaxp" != x; then
217 CURDIR="$PWD" 216 CURDIR="$PWD"
218 cd "$with_override_jaxp" 217 cd "$with_override_jaxp"
219 JAXP_TOPDIR="`pwd`" 218 JAXP_TOPDIR="`pwd`"
220 cd "$CURDIR" 219 cd "$CURDIR"
221 if ! test -f $JAXP_TOPDIR/makefiles/Makefile; then 220 if ! test -f $JAXP_TOPDIR/makefiles/Makefile; then
222 AC_MSG_ERROR([You have to override jaxp with a full jaxp repo!]) 221 AC_MSG_ERROR([You have to override jaxp with a full jaxp repo!])
223 fi 222 fi
224 AC_MSG_CHECKING([if jaxp should be overridden]) 223 AC_MSG_CHECKING([if jaxp should be overridden])
225 AC_MSG_RESULT([yes with $JAXP_TOPDIR]) 224 AC_MSG_RESULT([yes with $JAXP_TOPDIR])
226 fi 225 fi
227 if test "x$with_override_jaxws" != x; then 226 if test "x$with_override_jaxws" != x; then
228 CURDIR="$PWD" 227 CURDIR="$PWD"
229 cd "$with_override_jaxws" 228 cd "$with_override_jaxws"
230 JAXWS_TOPDIR="`pwd`" 229 JAXWS_TOPDIR="`pwd`"
231 cd "$CURDIR" 230 cd "$CURDIR"
232 if ! test -f $JAXWS_TOPDIR/makefiles/Makefile; then 231 if ! test -f $JAXWS_TOPDIR/makefiles/Makefile; then
233 AC_MSG_ERROR([You have to override jaxws with a full jaxws repo!]) 232 AC_MSG_ERROR([You have to override jaxws with a full jaxws repo!])
234 fi 233 fi
235 AC_MSG_CHECKING([if jaxws should be overridden]) 234 AC_MSG_CHECKING([if jaxws should be overridden])
236 AC_MSG_RESULT([yes with $JAXWS_TOPDIR]) 235 AC_MSG_RESULT([yes with $JAXWS_TOPDIR])
237 fi 236 fi
238 if test "x$with_override_hotspot" != x; then 237 if test "x$with_override_hotspot" != x; then
239 CURDIR="$PWD" 238 CURDIR="$PWD"
240 cd "$with_override_hotspot" 239 cd "$with_override_hotspot"
241 HOTSPOT_TOPDIR="`pwd`" 240 HOTSPOT_TOPDIR="`pwd`"
242 cd "$CURDIR" 241 cd "$CURDIR"
243 if ! test -f $HOTSPOT_TOPDIR/make/Makefile && \ 242 if ! test -f $HOTSPOT_TOPDIR/make/Makefile && \
244 ! test -f $HOTSPOT_TOPDIR/makefiles/Makefile; then 243 ! test -f $HOTSPOT_TOPDIR/makefiles/Makefile; then
245 AC_MSG_ERROR([You have to override hotspot with a full hotspot repo!]) 244 AC_MSG_ERROR([You have to override hotspot with a full hotspot repo!])
246 fi 245 fi
247 AC_MSG_CHECKING([if hotspot should be overridden]) 246 AC_MSG_CHECKING([if hotspot should be overridden])
248 AC_MSG_RESULT([yes with $HOTSPOT_TOPDIR]) 247 AC_MSG_RESULT([yes with $HOTSPOT_TOPDIR])
249 fi 248 fi
250 if test "x$with_override_nashorn" != x; then 249 if test "x$with_override_nashorn" != x; then
251 CURDIR="$PWD" 250 CURDIR="$PWD"
252 cd "$with_override_nashorn" 251 cd "$with_override_nashorn"
253 NASHORN_TOPDIR="`pwd`" 252 NASHORN_TOPDIR="`pwd`"
254 cd "$CURDIR" 253 cd "$CURDIR"
255 if ! test -f $NASHORN_TOPDIR/makefiles/Makefile; then 254 if ! test -f $NASHORN_TOPDIR/makefiles/Makefile; then
256 AC_MSG_ERROR([You have to override nashorn with a full nashorn repo!]) 255 AC_MSG_ERROR([You have to override nashorn with a full nashorn repo!])
257 fi 256 fi
258 AC_MSG_CHECKING([if nashorn should be overridden]) 257 AC_MSG_CHECKING([if nashorn should be overridden])
259 AC_MSG_RESULT([yes with $NASHORN_TOPDIR]) 258 AC_MSG_RESULT([yes with $NASHORN_TOPDIR])
260 fi 259 fi
261 if test "x$with_override_jdk" != x; then 260 if test "x$with_override_jdk" != x; then
262 CURDIR="$PWD" 261 CURDIR="$PWD"
263 cd "$with_override_jdk" 262 cd "$with_override_jdk"
264 JDK_TOPDIR="`pwd`" 263 JDK_TOPDIR="`pwd`"
265 cd "$CURDIR" 264 cd "$CURDIR"
266 if ! test -f $JDK_TOPDIR/makefiles/Makefile; then 265 if ! test -f $JDK_TOPDIR/makefiles/Makefile; then
267 AC_MSG_ERROR([You have to override JDK with a full JDK repo!]) 266 AC_MSG_ERROR([You have to override JDK with a full JDK repo!])
268 fi 267 fi
269 AC_MSG_CHECKING([if JDK should be overridden]) 268 AC_MSG_CHECKING([if JDK should be overridden])
270 AC_MSG_RESULT([yes with $JDK_TOPDIR]) 269 AC_MSG_RESULT([yes with $JDK_TOPDIR])
271 fi 270 fi
272
273 ]) 271 ])
274 272
275 AC_DEFUN_ONCE([SRCDIRS_SETUP_OUTPUT_DIRS], 273 AC_DEFUN_ONCE([SRCDIRS_SETUP_OUTPUT_DIRS],
276 [ 274 [
277 BUILD_OUTPUT="$OUTPUT_ROOT" 275 BUILD_OUTPUT="$OUTPUT_ROOT"
278 AC_SUBST(BUILD_OUTPUT) 276 AC_SUBST(BUILD_OUTPUT)
279 277
280 HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist" 278 HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
281 BUILD_HOTSPOT=true 279 BUILD_HOTSPOT=true
282 AC_SUBST(HOTSPOT_DIST) 280 AC_SUBST(HOTSPOT_DIST)
283 AC_SUBST(BUILD_HOTSPOT) 281 AC_SUBST(BUILD_HOTSPOT)
284 AC_ARG_WITH(import-hotspot, [AS_HELP_STRING([--with-import-hotspot], 282 AC_ARG_WITH(import-hotspot, [AS_HELP_STRING([--with-import-hotspot],
285 [import hotspot binaries from this jdk image or hotspot build dist dir instead of building from source])]) 283 [import hotspot binaries from this jdk image or hotspot build dist dir instead of building from source])])
286 if test "x$with_import_hotspot" != x; then 284 if test "x$with_import_hotspot" != x; then
287 CURDIR="$PWD" 285 CURDIR="$PWD"
288 cd "$with_import_hotspot" 286 cd "$with_import_hotspot"
289 HOTSPOT_DIST="`pwd`" 287 HOTSPOT_DIST="`pwd`"
290 cd "$CURDIR" 288 cd "$CURDIR"
291 if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then 289 if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
292 AC_MSG_ERROR([You have to import hotspot from a full jdk image or hotspot build dist dir!]) 290 AC_MSG_ERROR([You have to import hotspot from a full jdk image or hotspot build dist dir!])
293 fi 291 fi
294 AC_MSG_CHECKING([if hotspot should be imported]) 292 AC_MSG_CHECKING([if hotspot should be imported])
295 AC_MSG_RESULT([yes from $HOTSPOT_DIST]) 293 AC_MSG_RESULT([yes from $HOTSPOT_DIST])
296 BUILD_HOTSPOT=false 294 BUILD_HOTSPOT=false
297 fi 295 fi
298 296
299 JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk" 297 JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
300 ]) 298 ])

mercurial