source: rtems/aclocal/target.m4 @ 2e0fd427

4.104.114.84.9
Last change on this file since 2e0fd427 was 2e0fd427, checked in by Joel Sherrill <joel.sherrill@…>, on Nov 2, 2000 at 3:44:04 PM

2000-11-02 Ralf Corsepius <corsepiu@…>

  • aclocal/*: Replace with contents of macros/*.m4
  • macros/: Remove.
  • aclocal/ar-s.m4 aclocal/tool-prefix.m4: Remove.
  • Makefile.am: Reflect changes to aclocal/ and macros/.
  • Property mode set to 100644
File size: 3.4 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    echo configuring in $ac_config_dir
57
58    case "$srcdir" in
59##    .) ;;
60    *)
61      if test -d $ac_config_dir || mkdir $ac_config_dir; then :;
62      else
63        AC_MSG_ERROR(can not create `pwd`/$ac_config_dir)
64      fi
65      ;;
66    esac
67
68    ac_popdir=`pwd`
69    cd $ac_config_dir
70
71changequote(, )dnl
72      # A "../" for each directory in /$ac_config_dir.
73      ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
74changequote([, ])dnl
75
76    case "$srcdir" in
77##    .) # No --srcdir option.  We are building in place.
78##      ac_sub_srcdir=$srcdir ;;
79    /*) # Absolute path.
80      ac_sub_srcdir=$srcdir/$ac_config_dir ;;
81    *) # Relative path.
82      ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;;
83    esac
84
85    # Check for configure
86    if test -f $ac_sub_srcdir/configure; then
87      ac_sub_configure=$ac_sub_srcdir/configure
88    else
89      AC_MSG_WARN(no configuration information is in $ac_config_dir)
90      ac_sub_configure=
91    fi
92
93    # The recursion is here.
94    if test -n "$ac_sub_configure"; then
95      ac_sub_cache_file=./config.cache
96ifdef([AC_PROVIDE_AC_PROG_INSTALL],
97      [  case "$ac_given_INSTALL" in
98changequote(, )dnl
99        [/$]*) INSTALL="$ac_given_INSTALL" ;;
100changequote([, ])dnl
101        *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
102        esac
103])dnl
104
105      echo "[running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file] --srcdir=$ac_sub_srcdir"
106      # The eval makes quoting arguments work.
107      if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure \
108        $ac_sub_configure_args \
109        --srcdir=$ac_sub_srcdir \
110        --with-target-subdir=$target_subdir \
111        --cache-file=$ac_sub_cache_file
112      then :
113      else
114        AC_MSG_ERROR($ac_sub_configure failed for $ac_config_dir)
115      fi
116    fi
117
118    cd $ac_popdir
119  done
120fi
121])
Note: See TracBrowser for help on using the repository browser.