source: rtems/c/src/aclocal/target.m4 @ bd39add

4.115
Last change on this file since bd39add was 6963854d, checked in by Ralf Corsépius <ralf.corsepius@…>, on 05/18/12 at 05:47:52

Remove references to configure.in.

  • Property mode set to 100644
File size: 3.3 KB
Line 
1## HACK: Work-around to structural issue with RTEMS
2## The macros below violate most autoconf and canonicalization standards
3AC_DEFUN([RTEMS_CONFIG_BUILD_SUBDIRS],
4[AC_REQUIRE([_RTEMS_OUTPUT_BUILD_SUBDIRS])
5RTEMS_BUILD_SUBDIRS="$RTEMS_BUILD_SUBDIRS [$1]"
6])
7
8dnl Derived from automake-1.4's AC_OUTPUT_SUBDIRS
9AC_DEFUN([_RTEMS_OUTPUT_BUILD_SUBDIRS],
10[AC_CONFIG_COMMANDS([bsp-tools],
11[
12# HACK: This is a blantant hack and breaks Canadian crosses
13build_alias="$build_alias"
14host_alias="$build_alias"
15if test "$no_recursion" != yes; then
16  if test x"$build_alias" != x"$host_alias"; then
17    target_subdir="$host_alias"
18  else
19    target_subdir="."
20  fi
21  RTEMS_CONFIGURE_ARGS_QUOTE([ac_sub_configure_args],
22    [
23    -host* | --host* ) ;;
24    --host ) ac_prev=host_alias;;
25    -target* | --target* ) ;;
26    -target ) ac_prev=target_alias ;;
27    -build* | --build* ) ;;
28    -build ) ac_prev_build_alias ;;
29    CFLAGS=* );; # HACK: Strip CFLAGS
30    *_alias=* ) ;; # HACK: Workaround to autoconf passing *_alias
31    ],
32    [rtems_configure_args])
33
34  for rtems_config_dir in : $RTEMS_BUILD_SUBDIRS; do test "x$rtems_config_dir" = x: && continue
35
36    # Do not complain, so a configure script can configure whichever
37    # parts of a large source tree are present.
38    if test ! -d $srcdir/$rtems_config_dir; then
39      continue
40    fi
41
42    _RTEMS_PUSH_BUILDDIR([$rtems_config_dir])
43
44    _RTEMS_SUB_SRCDIR([$rtems_config_dir])
45
46    # The recursion is here.
47    if test -n "$ac_sub_configure"; then
48#      ac_sub_cache_file=./config.cache
49      ac_sub_cache_file=/dev/null
50      _RTEMS_GIVEN_INSTALL
51
52      echo "[running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file] --srcdir=$ac_sub_srcdir"
53      # The eval makes quoting arguments work.
54      if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure \
55        $ac_sub_configure_args \
56        --srcdir=$ac_sub_srcdir \
57        --with-target-subdir=$target_subdir \
58        --cache-file=$ac_sub_cache_file
59      then :
60      else
61        AC_MSG_ERROR([$ac_sub_configure failed for $rtems_config_dir])
62      fi
63    fi
64
65    _RTEMS_POP_BUILDDIR
66  done
67fi],
68[
69RTEMS_BUILD_SUBDIRS="$RTEMS_BUILD_SUBDIRS"
70rtems_configure_args="$ac_configure_args"
71])
72])
73
74dnl
75dnl Misc utility macros for subdir handling to work around missing abilities
76dnl in autoconf, automake and structural issues with RTEMS
77dnl
78dnl Contains parts derived from autoconf-2.13 AC_OUTPUT_SUBDIRS and Cygnus'
79dnl configure.ac.
80dnl
81
82dnl
83dnl _RTEMS_PUSH_BUILDDIR(SUBDIR)
84dnl
85AC_DEFUN([_RTEMS_PUSH_BUILDDIR],
86[
87# _RTEMS_PUSH_BUILDDIR
88    echo configuring in $1
89    case "$srcdir" in
90    .) ;;
91    *) AS_MKDIR_P([$1])
92      ;;
93    esac
94
95    ac_popdir=`pwd`
96    cd $1
97])
98
99dnl
100dnl _RTEMS_POP_BUILDDIR
101dnl
102AC_DEFUN([_RTEMS_POP_BUILDDIR],
103[
104  cd "$ac_popdir"
105])
106
107dnl
108dnl _RTEMS_GIVEN_INSTALL
109dnl
110AC_DEFUN([_RTEMS_GIVEN_INSTALL],
111[
112ifdef([AC_PROVIDE_AC_PROG_INSTALL],[ 
113  case "$ac_given_INSTALL" in
114  [[\\/]]* | ?:[[\\/]]*) INSTALL="$ac_given_INSTALL" ;;
115  *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
116  esac
117])dnl
118])
119
120dnl
121dnl _RTEMS_SUB_SRCDIR(AC_CONFIG_DIR[,TARGET_SUBDIR])
122dnl
123AC_DEFUN([_RTEMS_SUB_SRCDIR],[
124# _RTEMS_SUB_SRCDIR
125    _RTEMS_ADJUST_SRCDIR(ac_sub_srcdir,$1,$2)
126
127    # Check for configure
128    if test -f $ac_sub_srcdir/configure; then
129      ac_sub_configure=$ac_sub_srcdir/configure
130    else
131      AC_MSG_WARN([no configuration information is in $1])
132      ac_sub_configure=
133    fi
134])
Note: See TracBrowser for help on using the repository browser.