source: rtems/aclocal/target.m4 @ 2431a8cf

4.104.114.84.95
Last change on this file since 2431a8cf was 03d5706, checked in by Joel Sherrill <joel.sherrill@…>, on 09/12/00 at 12:52:12

2000-09-12 Ralf Corsepius <corsepiu@…>

  • aclocal/enable-rtemsbsp.m4: Add RTEMS_ENABLE_BARE, AC_SUBST(BARE_CPU_MODEL),AC_SUBST(BARE_CPU_CFLAGS).
  • aclocal/i386-gas-code16.m4: AC_DEFINE NEW_GAS.
  • aclocal/target.m4: Cleanup comments
  • Automake/compile.am: Add DEFS support to keep building happy.
  • Property mode set to 100644
File size: 3.7 KB
Line 
1dnl $Id$
2
3AC_DEFUN(RTEMS_CONFIG_SUBDIRS,
4[
5define([RTEMS_TGT_SUBDIRS],
6ifdef([RTEMS_TGT_SUBDIRS], [RTEMS_TGT_SUBDIRS ],)[$1])dnl
7target_subdirs="RTEMS_TGT_SUBDIRS"
8AC_SUBST(target_subdirs)
9])
10
11dnl Derived from automake-1.4's AC_OUTPUT_SUBDIRS
12AC_DEFUN(RTEMS_OUTPUT_SUBDIRS,
13[
14if test "$no_recursion" != yes; then
15  if test $target_alias != $host_alias; then
16    target_subdir="$target_alias"
17  else
18    target_subdir="."
19  fi
20  # Remove --cache-file and --srcdir arguments so they do not pile up.
21  ac_sub_configure_args=
22  ac_prev=
23  for ac_arg in $ac_configure_args; do
24    if test -n "$ac_prev"; then
25      ac_prev=
26      continue
27    fi
28    case "$ac_arg" in
29    -cache-file | --cache-file | --cache-fil | --cache-fi \
30    | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
31      ac_prev=cache_file ;;
32    -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
33    | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
34      ;;
35    -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
36      ac_prev=srcdir ;;
37    -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
38      ;;
39    *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;;
40    esac
41  done
42
43  test -d $target_subdir || mkdir $target_subdir
44  for ac_config_dir in $1; do
45
46    # Do not complain, so a configure script can configure whichever
47    # parts of a large source tree are present.
48    if test ! -d $srcdir/$ac_config_dir; then
49      continue
50    fi
51
52    echo configuring in $target_subdir/$ac_config_dir
53
54    case "$srcdir" in
55##    .) ;;
56    *)
57      if test -d $target_subdir/$ac_config_dir || mkdir $target_subdir/$ac_config_dir; then :;
58      else
59        AC_MSG_ERROR(can not create `pwd`/$target_subdir/$ac_config_dir)
60      fi
61      ;;
62    esac
63
64    ac_popdir=`pwd`
65    cd $target_subdir/$ac_config_dir
66
67changequote(, )dnl
68      # A "../" for each directory in /$ac_config_dir.
69      ac_dots=`echo $target_subdir/$ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
70changequote([, ])dnl
71
72    case "$srcdir" in
73##    .) # No --srcdir option.  We are building in place.
74##      ac_sub_srcdir=$srcdir ;;
75    /*) # Absolute path.
76      ac_sub_srcdir=$srcdir/$ac_config_dir ;;
77    *) # Relative path.
78      ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;;
79    esac
80
81    # Check for guested configure; otherwise get Cygnus style configure.
82    if test -f $ac_sub_srcdir/configure; then
83      ac_sub_configure=$ac_sub_srcdir/configure
84    elif test -f $ac_sub_srcdir/configure.in; then
85      ac_sub_configure=$ac_configure
86    else
87      AC_MSG_WARN(no configuration information is in $ac_config_dir)
88      ac_sub_configure=
89    fi
90
91    # The recursion is here.
92    if test -n "$ac_sub_configure"; then
93
94      # Make the cache file name correct relative to the subdirectory.
95      if test "$target_alias" != "$host_alias"; then
96      ac_sub_cache_file=$cache_file
97      else
98      case "$cache_file" in
99      /*) ac_sub_cache_file=$cache_file ;;
100      *) # Relative path.
101        ac_sub_cache_file="$ac_dots$cache_file" ;;
102      esac
103      fi
104ifdef([AC_PROVIDE_AC_PROG_INSTALL],
105      [  case "$ac_given_INSTALL" in
106changequote(, )dnl
107        [/$]*) INSTALL="$ac_given_INSTALL" ;;
108changequote([, ])dnl
109        *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
110        esac
111])dnl
112
113      echo "[running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file] --srcdir=$ac_sub_srcdir"
114      # The eval makes quoting arguments work.
115      if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure \
116        $ac_sub_configure_args --srcdir=$ac_sub_srcdir \
117        --with-target-subdir=$target_subdir --cache-file=$ac_sub_cache_file
118      then :
119      else
120        AC_MSG_ERROR($ac_sub_configure failed for $ac_config_dir)
121      fi
122    fi
123
124    cd $ac_popdir
125  done
126fi
127])
Note: See TracBrowser for help on using the repository browser.