1 | dnl aclocal.m4 generated automatically by aclocal 1.4 |
---|
2 | |
---|
3 | dnl Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc. |
---|
4 | dnl This file is free software; the Free Software Foundation |
---|
5 | dnl gives unlimited permission to copy and/or distribute it, |
---|
6 | dnl with or without modifications, as long as this notice is preserved. |
---|
7 | |
---|
8 | dnl This program is distributed in the hope that it will be useful, |
---|
9 | dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without |
---|
10 | dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A |
---|
11 | dnl PARTICULAR PURPOSE. |
---|
12 | |
---|
13 | dnl $Id$ |
---|
14 | |
---|
15 | dnl |
---|
16 | dnl RTEMS_TOP($1) |
---|
17 | dnl |
---|
18 | dnl $1 .. relative path from this configure.in to the toplevel configure.in |
---|
19 | dnl |
---|
20 | AC_DEFUN(RTEMS_TOP, |
---|
21 | [dnl |
---|
22 | AC_ARG_WITH(target-subdir, |
---|
23 | [ --with-target-subdir=DIR], |
---|
24 | TARGET_SUBDIR="$withval", |
---|
25 | TARGET_SUBDIR=".") |
---|
26 | |
---|
27 | RTEMS_TOPdir="$1"; |
---|
28 | AC_SUBST(RTEMS_TOPdir) |
---|
29 | |
---|
30 | dnl Determine RTEMS Version string from the VERSION file |
---|
31 | dnl Hopefully, Joel never changes its format ;- |
---|
32 | AC_MSG_CHECKING([for RTEMS Version]) |
---|
33 | if test -r "${srcdir}/${RTEMS_TOPdir}/VERSION"; then |
---|
34 | changequote(,)dnl |
---|
35 | RTEMS_VERSION=`grep Version ${srcdir}/${RTEMS_TOPdir}/VERSION | \ |
---|
36 | sed -e 's%RTEMS[ ]*Version[ ]*\(.*\)[ ]*%\1%g'` |
---|
37 | changequote([,])dnl |
---|
38 | else |
---|
39 | AC_MSG_ERROR(Unable to find ${RTEMS_TOPdir}/VERSION) |
---|
40 | fi |
---|
41 | if test -z "$RTEMS_VERSION"; then |
---|
42 | AC_MSG_ERROR(Unable to determine version) |
---|
43 | fi |
---|
44 | AC_MSG_RESULT($RTEMS_VERSION) |
---|
45 | ])dnl |
---|
46 | |
---|
47 | dnl |
---|
48 | dnl $Id$ |
---|
49 | dnl |
---|
50 | |
---|
51 | dnl canonicalize target cpu |
---|
52 | dnl NOTE: Most rtems targets do not fullfil autoconf's |
---|
53 | dnl target naming conventions "processor-vendor-os" |
---|
54 | dnl Therefore autoconf's AC_CANONICAL_TARGET will fail for them |
---|
55 | dnl and we have to fix it for rtems ourselves |
---|
56 | |
---|
57 | AC_DEFUN(RTEMS_CANONICAL_TARGET_CPU, |
---|
58 | [ |
---|
59 | AC_CANONICAL_SYSTEM |
---|
60 | AC_MSG_CHECKING(rtems target cpu) |
---|
61 | changequote(,)dnl |
---|
62 | case "${target}" in |
---|
63 | # hpux unix port should go here |
---|
64 | i[3456]86-go32-rtems*) |
---|
65 | RTEMS_CPU=i386 |
---|
66 | ;; |
---|
67 | i[3456]86-pc-linux*) # unix "simulator" port |
---|
68 | RTEMS_CPU=unix |
---|
69 | ;; |
---|
70 | i[3456]86-*freebsd2*) # unix "simulator" port |
---|
71 | RTEMS_CPU=unix |
---|
72 | ;; |
---|
73 | no_cpu-*rtems*) |
---|
74 | RTEMS_CPU=no_cpu |
---|
75 | ;; |
---|
76 | sparc-sun-solaris*) # unix "simulator" port |
---|
77 | RTEMS_CPU=unix |
---|
78 | ;; |
---|
79 | *) |
---|
80 | RTEMS_CPU=`echo $target | sed 's%^\([^-]*\)-\(.*\)$%\1%'` |
---|
81 | ;; |
---|
82 | esac |
---|
83 | changequote([,])dnl |
---|
84 | AC_SUBST(RTEMS_CPU) |
---|
85 | AC_MSG_RESULT($RTEMS_CPU) |
---|
86 | ]) |
---|
87 | |
---|
88 | # Do all the work for Automake. This macro actually does too much -- |
---|
89 | # some checks are only needed if your package does certain things. |
---|
90 | # But this isn't really a big deal. |
---|
91 | |
---|
92 | # serial 1 |
---|
93 | |
---|
94 | dnl Usage: |
---|
95 | dnl AM_INIT_AUTOMAKE(package,version, [no-define]) |
---|
96 | |
---|
97 | AC_DEFUN(AM_INIT_AUTOMAKE, |
---|
98 | [AC_REQUIRE([AC_PROG_INSTALL]) |
---|
99 | PACKAGE=[$1] |
---|
100 | AC_SUBST(PACKAGE) |
---|
101 | VERSION=[$2] |
---|
102 | AC_SUBST(VERSION) |
---|
103 | dnl test to see if srcdir already configured |
---|
104 | if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then |
---|
105 | AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) |
---|
106 | fi |
---|
107 | ifelse([$3],, |
---|
108 | AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) |
---|
109 | AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])) |
---|
110 | AC_REQUIRE([AM_SANITY_CHECK]) |
---|
111 | AC_REQUIRE([AC_ARG_PROGRAM]) |
---|
112 | dnl FIXME This is truly gross. |
---|
113 | missing_dir=`cd $ac_aux_dir && pwd` |
---|
114 | AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir) |
---|
115 | AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir) |
---|
116 | AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir) |
---|
117 | AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir) |
---|
118 | AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir) |
---|
119 | AC_REQUIRE([AC_PROG_MAKE_SET])]) |
---|
120 | |
---|
121 | # |
---|
122 | # Check to make sure that the build environment is sane. |
---|
123 | # |
---|
124 | |
---|
125 | AC_DEFUN(AM_SANITY_CHECK, |
---|
126 | [AC_MSG_CHECKING([whether build environment is sane]) |
---|
127 | # Just in case |
---|
128 | sleep 1 |
---|
129 | echo timestamp > conftestfile |
---|
130 | # Do `set' in a subshell so we don't clobber the current shell's |
---|
131 | # arguments. Must try -L first in case configure is actually a |
---|
132 | # symlink; some systems play weird games with the mod time of symlinks |
---|
133 | # (eg FreeBSD returns the mod time of the symlink's containing |
---|
134 | # directory). |
---|
135 | if ( |
---|
136 | set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null` |
---|
137 | if test "[$]*" = "X"; then |
---|
138 | # -L didn't work. |
---|
139 | set X `ls -t $srcdir/configure conftestfile` |
---|
140 | fi |
---|
141 | if test "[$]*" != "X $srcdir/configure conftestfile" \ |
---|
142 | && test "[$]*" != "X conftestfile $srcdir/configure"; then |
---|
143 | |
---|
144 | # If neither matched, then we have a broken ls. This can happen |
---|
145 | # if, for instance, CONFIG_SHELL is bash and it inherits a |
---|
146 | # broken ls alias from the environment. This has actually |
---|
147 | # happened. Such a system could not be considered "sane". |
---|
148 | AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken |
---|
149 | alias in your environment]) |
---|
150 | fi |
---|
151 | |
---|
152 | test "[$]2" = conftestfile |
---|
153 | ) |
---|
154 | then |
---|
155 | # Ok. |
---|
156 | : |
---|
157 | else |
---|
158 | AC_MSG_ERROR([newly created file is older than distributed files! |
---|
159 | Check your system clock]) |
---|
160 | fi |
---|
161 | rm -f conftest* |
---|
162 | AC_MSG_RESULT(yes)]) |
---|
163 | |
---|
164 | dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY) |
---|
165 | dnl The program must properly implement --version. |
---|
166 | AC_DEFUN(AM_MISSING_PROG, |
---|
167 | [AC_MSG_CHECKING(for working $2) |
---|
168 | # Run test in a subshell; some versions of sh will print an error if |
---|
169 | # an executable is not found, even if stderr is redirected. |
---|
170 | # Redirect stdin to placate older versions of autoconf. Sigh. |
---|
171 | if ($2 --version) < /dev/null > /dev/null 2>&1; then |
---|
172 | $1=$2 |
---|
173 | AC_MSG_RESULT(found) |
---|
174 | else |
---|
175 | $1="$3/missing $2" |
---|
176 | AC_MSG_RESULT(missing) |
---|
177 | fi |
---|
178 | AC_SUBST($1)]) |
---|
179 | |
---|
180 | # Add --enable-maintainer-mode option to configure. |
---|
181 | # From Jim Meyering |
---|
182 | |
---|
183 | # serial 1 |
---|
184 | |
---|
185 | AC_DEFUN(AM_MAINTAINER_MODE, |
---|
186 | [AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) |
---|
187 | dnl maintainer-mode is disabled by default |
---|
188 | AC_ARG_ENABLE(maintainer-mode, |
---|
189 | [ --enable-maintainer-mode enable make rules and dependencies not useful |
---|
190 | (and sometimes confusing) to the casual installer], |
---|
191 | USE_MAINTAINER_MODE=$enableval, |
---|
192 | USE_MAINTAINER_MODE=no) |
---|
193 | AC_MSG_RESULT($USE_MAINTAINER_MODE) |
---|
194 | AM_CONDITIONAL(MAINTAINER_MODE, test $USE_MAINTAINER_MODE = yes) |
---|
195 | MAINT=$MAINTAINER_MODE_TRUE |
---|
196 | AC_SUBST(MAINT)dnl |
---|
197 | ] |
---|
198 | ) |
---|
199 | |
---|
200 | # Define a conditional. |
---|
201 | |
---|
202 | AC_DEFUN(AM_CONDITIONAL, |
---|
203 | [AC_SUBST($1_TRUE) |
---|
204 | AC_SUBST($1_FALSE) |
---|
205 | if $2; then |
---|
206 | $1_TRUE= |
---|
207 | $1_FALSE='#' |
---|
208 | else |
---|
209 | $1_TRUE='#' |
---|
210 | $1_FALSE= |
---|
211 | fi]) |
---|
212 | |
---|
213 | dnl $Id$ |
---|
214 | |
---|
215 | AC_DEFUN(RTEMS_ENABLE_MULTIPROCESSING, |
---|
216 | [ |
---|
217 | AC_ARG_ENABLE(multiprocessing, |
---|
218 | [ --enable-multiprocessing enable multiprocessing interface], |
---|
219 | [case "${enableval}" in |
---|
220 | yes) RTEMS_HAS_MULTIPROCESSING=yes ;; |
---|
221 | no) RTEMS_HAS_MULTIPROCESSING=no ;; |
---|
222 | *) AC_MSG_ERROR(bad value ${enableval} for enable-multiprocessing option) ;; |
---|
223 | esac],[RTEMS_HAS_MULTIPROCESSING=no]) |
---|
224 | AC_SUBST(RTEMS_HAS_MULTIPROCESSING)dnl |
---|
225 | ]) |
---|
226 | |
---|
227 | dnl $Id$ |
---|
228 | |
---|
229 | AC_DEFUN(RTEMS_ENABLE_POSIX, |
---|
230 | [ |
---|
231 | AC_ARG_ENABLE(posix, |
---|
232 | [ --enable-posix enable posix interface], |
---|
233 | [case "${enableval}" in |
---|
234 | yes) RTEMS_HAS_POSIX_API=yes ;; |
---|
235 | no) RTEMS_HAS_POSIX_API=no ;; |
---|
236 | *) AC_MSG_ERROR(bad value ${enableval} for enable-posix option) ;; |
---|
237 | esac],[RTEMS_HAS_POSIX_API=yes]) |
---|
238 | AC_SUBST(RTEMS_HAS_POSIX_API) |
---|
239 | |
---|
240 | changequote(,)dnl |
---|
241 | case "${target}" in |
---|
242 | # hpux unix port should go here |
---|
243 | i[3456]86-go32-rtems*) |
---|
244 | RTEMS_HAS_POSIX_API=no |
---|
245 | ;; |
---|
246 | i[3456]86-pc-linux*) # unix "simulator" port |
---|
247 | RTEMS_HAS_POSIX_API=no |
---|
248 | ;; |
---|
249 | i[3456]86-*freebsd2*) # unix "simulator" port |
---|
250 | RTEMS_HAS_POSIX_API=no |
---|
251 | ;; |
---|
252 | no_cpu-*rtems*) |
---|
253 | RTEMS_HAS_POSIX_API=no |
---|
254 | ;; |
---|
255 | sparc-sun-solaris*) # unix "simulator" port |
---|
256 | RTEMS_HAS_POSIX_API=no |
---|
257 | ;; |
---|
258 | *) |
---|
259 | ;; |
---|
260 | esac |
---|
261 | changequote([,])dnl |
---|
262 | AC_SUBST(RTEMS_HAS_POSIX_API) |
---|
263 | ]) |
---|
264 | |
---|
265 | dnl $Id$ |
---|
266 | |
---|
267 | AC_DEFUN(RTEMS_ENABLE_NETWORKING, |
---|
268 | [ |
---|
269 | AC_ARG_ENABLE(networking, |
---|
270 | [ --enable-networking enable TCP/IP stack], |
---|
271 | [case "${enableval}" in |
---|
272 | yes) RTEMS_HAS_NETWORKING=yes ;; |
---|
273 | no) RTEMS_HAS_NETWORKING=no ;; |
---|
274 | *) AC_MSG_ERROR(bad value ${enableval} for enable-networking option) ;; |
---|
275 | esac],[RTEMS_HAS_NETWORKING=yes]) |
---|
276 | AC_SUBST(RTEMS_HAS_NETWORKING)dnl |
---|
277 | ]) |
---|
278 | |
---|
279 | dnl $Id$ |
---|
280 | |
---|
281 | AC_DEFUN(RTEMS_ENABLE_RDBG, |
---|
282 | [ |
---|
283 | AC_ARG_ENABLE(rdbg, |
---|
284 | [ --enable-rdbg enable remote debugger], |
---|
285 | [case "${enableval}" in |
---|
286 | yes) RTEMS_HAS_RDBG=yes ;; |
---|
287 | no) RTEMS_HAS_RDBG=no ;; |
---|
288 | *) AC_MSG_ERROR(bad value ${enableval} for enable-rdbg option) ;; |
---|
289 | esac],[RTEMS_HAS_RDBG=no]) |
---|
290 | AC_SUBST(RTEMS_HAS_RDBG)dnl |
---|
291 | ]) |
---|
292 | |
---|
293 | dnl $Id$ |
---|
294 | |
---|
295 | AC_DEFUN(RTEMS_ENABLE_INLINES, |
---|
296 | [AC_ARG_ENABLE(rtems-inlines, |
---|
297 | [ --enable-rtems-inlines enable RTEMS inline functions] |
---|
298 | [ (default:enabled, disable to use macros)], |
---|
299 | [case "${enableval}" in |
---|
300 | yes) RTEMS_USE_MACROS=no ;; |
---|
301 | no) RTEMS_USE_MACROS=yes ;; |
---|
302 | *) AC_MSG_ERROR(bad value ${enableval} for disable-rtems-inlines option) ;; |
---|
303 | esac],[RTEMS_USE_MACROS=no]) |
---|
304 | AC_SUBST(RTEMS_USE_MACROS)dnl |
---|
305 | ]) |
---|
306 | |
---|
307 | dnl $Id$ |
---|
308 | |
---|
309 | AC_DEFUN(RTEMS_ENABLE_CXX, |
---|
310 | [ |
---|
311 | AC_ARG_ENABLE(cxx, |
---|
312 | [ --enable-cxx enable C++ support,] |
---|
313 | [ and build the rtems++ library], |
---|
314 | [case "${enableval}" in |
---|
315 | yes) RTEMS_HAS_CPLUSPLUS=yes ;; |
---|
316 | no) RTEMS_HAS_CPLUSPLUS=no ;; |
---|
317 | *) AC_MSG_ERROR(bad value ${enableval} for enable-cxx option) ;; |
---|
318 | esac], [RTEMS_HAS_CPLUSPLUS=no]) |
---|
319 | ]) |
---|
320 | |
---|
321 | dnl $Id$ |
---|
322 | |
---|
323 | AC_DEFUN(RTEMS_ENABLE_GCC28, |
---|
324 | [ |
---|
325 | AC_ARG_ENABLE(gcc28, |
---|
326 | [ --enable-gcc28 enable use of gcc 2.8.x features], |
---|
327 | [case "${enableval}" in |
---|
328 | yes) RTEMS_USE_GCC272=no ;; |
---|
329 | no) RTEMS_USE_GCC272=yes ;; |
---|
330 | *) AC_MSG_ERROR(bad value ${enableval} for gcc-28 option) ;; |
---|
331 | esac],[RTEMS_USE_GCC272=no]) |
---|
332 | ]) |
---|
333 | |
---|
334 | dnl $Id$ |
---|
335 | |
---|
336 | AC_DEFUN(RTEMS_ENABLE_LIBCDIR, |
---|
337 | [ |
---|
338 | AC_ARG_ENABLE(libcdir, |
---|
339 | [ --enable-libcdir=directory set the directory for the C library], |
---|
340 | [ RTEMS_LIBC_DIR="${enableval}" ; \ |
---|
341 | test -d ${enableval} || AC_MSG_ERROR("$enableval is not a directory" ) ] ) |
---|
342 | AC_SUBST(RTEMS_LIBC_DIR)dnl |
---|
343 | ]) |
---|
344 | |
---|
345 | dnl $Id$ |
---|
346 | |
---|
347 | AC_DEFUN(RTEMS_ENABLE_TESTS, |
---|
348 | [ |
---|
349 | # If the tests are enabled, then find all the test suite Makefiles |
---|
350 | AC_MSG_CHECKING([if the test suites are enabled? ]) |
---|
351 | AC_ARG_ENABLE(tests, |
---|
352 | [ --enable-tests enable tests (default:disabled)], |
---|
353 | [case "${enableval}" in |
---|
354 | yes) tests_enabled=yes ;; |
---|
355 | no) tests_enabled=no ;; |
---|
356 | *) AC_MSG_ERROR(bad value ${enableval} for tests option) ;; |
---|
357 | esac], [tests_enabled=no]) |
---|
358 | AC_MSG_RESULT([$tests_enabled]) |
---|
359 | ]) |
---|
360 | |
---|
361 | dnl $Id$ |
---|
362 | dnl |
---|
363 | dnl FIXME: this needs to be reworked |
---|
364 | |
---|
365 | AC_DEFUN(RTEMS_ENABLE_HWAPI, |
---|
366 | [dnl |
---|
367 | AC_ARG_ENABLE(hwapi, \ |
---|
368 | [ --enable-hwapi enable hardware API library], |
---|
369 | [case "${enableval}" in |
---|
370 | yes) RTEMS_HAS_HWAPI=yes ;; |
---|
371 | no) RTEMS_HAS_HWAPI=no ;; |
---|
372 | *) AC_MSG_ERROR(bad value ${enableval} for hwapi option) ;; |
---|
373 | esac],[RTEMS_HAS_HWAPI=no]) |
---|
374 | AC_SUBST(RTEMS_HAS_HWAPI)dnl |
---|
375 | ])dnl |
---|
376 | |
---|
377 | dnl $Id$ |
---|
378 | |
---|
379 | dnl check if RTEMS support a cpu |
---|
380 | AC_DEFUN(RTEMS_CHECK_CPU, |
---|
381 | [dnl |
---|
382 | AC_REQUIRE([RTEMS_TOP]) |
---|
383 | AC_REQUIRE([RTEMS_CANONICAL_TARGET_CPU]) |
---|
384 | # Is this a supported CPU? |
---|
385 | AC_MSG_CHECKING([if cpu $RTEMS_CPU is supported]) |
---|
386 | if test -d "$srcdir/$RTEMS_TOPdir/c/src/exec/score/cpu/$RTEMS_CPU"; then |
---|
387 | AC_MSG_RESULT(yes) |
---|
388 | else |
---|
389 | AC_MSG_ERROR(no) |
---|
390 | fi |
---|
391 | ])dnl |
---|
392 | |
---|
393 | |
---|
394 | dnl $Id$ |
---|
395 | |
---|
396 | AC_DEFUN(RTEMS_CANONICAL_HOST, |
---|
397 | [dnl |
---|
398 | AC_REQUIRE([AC_CANONICAL_HOST]) |
---|
399 | RTEMS_HOST=$host_os |
---|
400 | changequote(,)dnl |
---|
401 | case "${target}" in |
---|
402 | # hpux unix port should go here |
---|
403 | i[3456]86-pc-linux*) # unix "simulator" port |
---|
404 | RTEMS_HOST=Linux |
---|
405 | ;; |
---|
406 | i[3456]86-*freebsd2*) # unix "simulator" port |
---|
407 | RTEMS_HOST=FreeBSD |
---|
408 | ;; |
---|
409 | sparc-sun-solaris*) # unix "simulator" port |
---|
410 | RTEMS_HOST=Solaris |
---|
411 | ;; |
---|
412 | *) |
---|
413 | ;; |
---|
414 | esac |
---|
415 | changequote([,])dnl |
---|
416 | AC_SUBST(RTEMS_HOST) |
---|
417 | ])dnl |
---|
418 | |
---|
419 | dnl $Id$ |
---|
420 | |
---|
421 | AC_DEFUN(RTEMS_CONFIG_SUBDIRS, |
---|
422 | [ |
---|
423 | define([RTEMS_TGT_SUBDIRS], |
---|
424 | ifdef([RTEMS_TGT_SUBDIRS], [RTEMS_TGT_SUBDIRS ],)[$1])dnl |
---|
425 | target_subdirs="RTEMS_TGT_SUBDIRS" |
---|
426 | AC_SUBST(target_subdirs) |
---|
427 | ]) |
---|
428 | |
---|
429 | dnl This is a subroutine of AC_OUTPUT. |
---|
430 | dnl It is called after running config.status. |
---|
431 | dnl AC_OUTPUT_SUBDIRS(DIRECTORY...) |
---|
432 | AC_DEFUN(RTEMS_OUTPUT_SUBDIRS, |
---|
433 | [ |
---|
434 | # bla |
---|
435 | if test "$no_recursion" != yes; then |
---|
436 | if test $target_alias != $host_alias; then |
---|
437 | target_subdir="$target_alias" |
---|
438 | else |
---|
439 | target_subdir="." |
---|
440 | fi |
---|
441 | # Remove --cache-file and --srcdir arguments so they do not pile up. |
---|
442 | ac_sub_configure_args= |
---|
443 | ac_prev= |
---|
444 | for ac_arg in $ac_configure_args; do |
---|
445 | if test -n "$ac_prev"; then |
---|
446 | ac_prev= |
---|
447 | continue |
---|
448 | fi |
---|
449 | case "$ac_arg" in |
---|
450 | -cache-file | --cache-file | --cache-fil | --cache-fi \ |
---|
451 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) |
---|
452 | ac_prev=cache_file ;; |
---|
453 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ |
---|
454 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) |
---|
455 | ;; |
---|
456 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) |
---|
457 | ac_prev=srcdir ;; |
---|
458 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) |
---|
459 | ;; |
---|
460 | *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;; |
---|
461 | esac |
---|
462 | done |
---|
463 | |
---|
464 | test -d $target_subdir || mkdir $target_subdir |
---|
465 | for ac_config_dir in $1; do |
---|
466 | |
---|
467 | # Do not complain, so a configure script can configure whichever |
---|
468 | # parts of a large source tree are present. |
---|
469 | if test ! -d $srcdir/$ac_config_dir; then |
---|
470 | continue |
---|
471 | fi |
---|
472 | |
---|
473 | echo configuring in $target_subdir/$ac_config_dir |
---|
474 | |
---|
475 | case "$srcdir" in |
---|
476 | .) ;; |
---|
477 | *) |
---|
478 | if test -d $target_subdir/$ac_config_dir || mkdir $target_subdir/$ac_config_dir; then :; |
---|
479 | else |
---|
480 | AC_MSG_ERROR(can not create `pwd`/$target_subdir/$ac_config_dir) |
---|
481 | fi |
---|
482 | ;; |
---|
483 | esac |
---|
484 | |
---|
485 | ac_popdir=`pwd` |
---|
486 | cd $target_subdir/$ac_config_dir |
---|
487 | |
---|
488 | changequote(, )dnl |
---|
489 | # A "../" for each directory in /$ac_config_dir. |
---|
490 | ac_dots=`echo $target_subdir/$ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'` |
---|
491 | changequote([, ])dnl |
---|
492 | |
---|
493 | case "$srcdir" in |
---|
494 | .) # No --srcdir option. We are building in place. |
---|
495 | ac_sub_srcdir=$srcdir ;; |
---|
496 | /*) # Absolute path. |
---|
497 | ac_sub_srcdir=$srcdir/$ac_config_dir ;; |
---|
498 | *) # Relative path. |
---|
499 | ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;; |
---|
500 | esac |
---|
501 | |
---|
502 | # Check for guested configure; otherwise get Cygnus style configure. |
---|
503 | if test -f $ac_sub_srcdir/configure; then |
---|
504 | ac_sub_configure=$ac_sub_srcdir/configure |
---|
505 | elif test -f $ac_sub_srcdir/configure.in; then |
---|
506 | ac_sub_configure=$ac_configure |
---|
507 | else |
---|
508 | AC_MSG_WARN(no configuration information is in $ac_config_dir) |
---|
509 | ac_sub_configure= |
---|
510 | fi |
---|
511 | |
---|
512 | # The recursion is here. |
---|
513 | if test -n "$ac_sub_configure"; then |
---|
514 | |
---|
515 | # Make the cache file name correct relative to the subdirectory. |
---|
516 | if test "$target_alias" != "$host_alias"; then |
---|
517 | ac_sub_cache_file=$cache_file |
---|
518 | else |
---|
519 | case "$cache_file" in |
---|
520 | /*) ac_sub_cache_file=$cache_file ;; |
---|
521 | *) # Relative path. |
---|
522 | ac_sub_cache_file="$ac_dots$cache_file" ;; |
---|
523 | esac |
---|
524 | fi |
---|
525 | ifdef([AC_PROVIDE_AC_PROG_INSTALL], |
---|
526 | [ case "$ac_given_INSTALL" in |
---|
527 | changequote(, )dnl |
---|
528 | [/$]*) INSTALL="$ac_given_INSTALL" ;; |
---|
529 | changequote([, ])dnl |
---|
530 | *) INSTALL="$ac_dots$ac_given_INSTALL" ;; |
---|
531 | esac |
---|
532 | ])dnl |
---|
533 | |
---|
534 | echo "[running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file] --srcdir=$ac_sub_srcdir" |
---|
535 | # The eval makes quoting arguments work. |
---|
536 | if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure \ |
---|
537 | $ac_sub_configure_args --srcdir=$ac_sub_srcdir \ |
---|
538 | --with-target-subdir=$target_subdir --cache-file=$ac_sub_cache_file |
---|
539 | then : |
---|
540 | else |
---|
541 | AC_MSG_ERROR($ac_sub_configure failed for $ac_config_dir) |
---|
542 | fi |
---|
543 | fi |
---|
544 | |
---|
545 | cd $ac_popdir |
---|
546 | done |
---|
547 | fi |
---|
548 | ]) |
---|
549 | |
---|