source: rtems/aclocal/target.m4 @ f5c58361

4.104.114.84.95
Last change on this file since f5c58361 was f5c58361, checked in by Joel Sherrill <joel.sherrill@…>, on Feb 5, 2001 at 6:04:57 PM

2001-02-03 Ralf Corsepius <corsepiu@…>

  • aclocal/config-subdirs.m4: New file.
  • aclocal/target.m4: Use macros from config-subdirs.m4.
  • Property mode set to 100644
File size: 2.3 KB
Line 
1dnl $Id$
2
3## HACK: Work-around to structural issue with RTEMS
4## The macros below violate most autoconf and canonicalization standards
5AC_DEFUN(RTEMS_CONFIG_BUILD_SUBDIRS,
6[
7define([RTEMS_BUILD_SUBDIRS],
8ifdef([RTEMS_BUILD_SUBDIRS], [RTEMS_BUILD_SUBDIRS ],)[$1])dnl
9build_subdirs="RTEMS_BUILD_SUBDIRS"
10AC_SUBST(build_subdirs)
11])
12
13dnl Derived from automake-1.4's AC_OUTPUT_SUBDIRS
14AC_DEFUN(RTEMS_OUTPUT_BUILD_SUBDIRS,
15[
16if test "$no_recursion" != yes; then
17  if test $build_alias != $host_alias; then
18    target_subdir="$host_alias"
19  else
20    target_subdir="."
21  fi
22  # Remove --cache-file and --srcdir arguments so they do not pile up.
23  ac_sub_configure_args=
24  ac_prev=
25  for ac_arg in $ac_configure_args; do
26    if test -n "$ac_prev"; then
27      ac_prev=
28      continue
29    fi
30    case "$ac_arg" in
31    -cache-file | --cache-file | --cache-fil | --cache-fi \
32    | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
33      ac_prev=cache_file ;;
34    -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
35    | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
36      ;;
37    -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
38      ac_prev=srcdir ;;
39    -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
40      ;;
41    --target*) ;;
42    --build*) ;;
43    --host*) ;;
44    *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;;
45    esac
46  done
47
48  for ac_config_dir in $1; do
49
50    # Do not complain, so a configure script can configure whichever
51    # parts of a large source tree are present.
52    if test ! -d $srcdir/$ac_config_dir; then
53      continue
54    fi
55
56    _RTEMS_PUSH_BUILDDIR([$ac_config_dir])
57
58    _RTEMS_SUB_SRCDIR([$ac_config_dir])
59
60    # The recursion is here.
61    if test -n "$ac_sub_configure"; then
62      ac_sub_cache_file=./config.cache
63      _RTEMS_GIVEN_INSTALL
64
65      echo "[running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file] --srcdir=$ac_sub_srcdir"
66      # The eval makes quoting arguments work.
67      if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure \
68        $ac_sub_configure_args \
69        --srcdir=$ac_sub_srcdir \
70        --with-target-subdir=$target_subdir \
71        --cache-file=$ac_sub_cache_file
72      then :
73      else
74        AC_MSG_ERROR([$ac_sub_configure failed for $ac_config_dir])
75      fi
76    fi
77
78    _RTEMS_POP_BUILDDIR
79  done
80fi
81])
Note: See TracBrowser for help on using the repository browser.