source: rtems/aclocal/target.m4 @ 73defea0

4.104.114.84.95
Last change on this file since 73defea0 was 984123f, checked in by Ralf Corsepius <ralf.corsepius@…>, on 11/19/02 at 14:54:45

2002-11-19 Ralf Corsepius <corsepiu@…>

  • aclocal/sysv-ipc.m4: Remove (Unused).
  • aclocal/target.m4: Sync with acinclude.m4 (Part of fix to PR 312).
  • Property mode set to 100644
File size: 3.4 KB
RevLine 
[eb299afc]1dnl $Id$
2
[2e0fd427]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,
[37b5d78]6[AC_REQUIRE([_RTEMS_OUTPUT_BUILD_SUBDIRS])
7RTEMS_BUILD_SUBDIRS="$RTEMS_BUILD_SUBDIRS [$1]"
[eb299afc]8])
9
[03d5706]10dnl Derived from automake-1.4's AC_OUTPUT_SUBDIRS
[37b5d78]11AC_DEFUN([_RTEMS_OUTPUT_BUILD_SUBDIRS],
12[AC_CONFIG_COMMANDS([bsp-tools],
[eb299afc]13[
[37b5d78]14# HACK: This is a blantant hack and breaks Canadian crosses
15build_alias="$build_alias"
16host_alias="$build_alias"
[eb299afc]17if test "$no_recursion" != yes; then
[37b5d78]18  if test x"$build_alias" != x"$host_alias"; then
[2e0fd427]19    target_subdir="$host_alias"
[eb299afc]20  else
21    target_subdir="."
22  fi
[824bf2e4]23  RTEMS_CONFIGURE_ARGS_QUOTE([ac_sub_configure_args],
24    [
[984123f]25    -host* | --host* ) ;;
26    --host ) ac_prev=host_alias;;
27    -target* | --target* ) ;;
28    -target ) ac_prev=target_alias ;;
29    -build* | --build* ) ;;
30    -build ) ac_prev_build_alias ;;
[824bf2e4]31    *_alias=* ) ;; # HACK: Workaround to autoconf passing *_alias
32    ],
33    [rtems_configure_args])
[eb299afc]34
[37b5d78]35  for rtems_config_dir in $RTEMS_BUILD_SUBDIRS; do
[eb299afc]36    # Do not complain, so a configure script can configure whichever
37    # parts of a large source tree are present.
[37b5d78]38    if test ! -d $srcdir/$rtems_config_dir; then
[eb299afc]39      continue
40    fi
41
[37b5d78]42    _RTEMS_PUSH_BUILDDIR([$rtems_config_dir])
[eb299afc]43
[37b5d78]44    _RTEMS_SUB_SRCDIR([$rtems_config_dir])
[eb299afc]45
46    # The recursion is here.
47    if test -n "$ac_sub_configure"; then
[37b5d78]48#      ac_sub_cache_file=./config.cache
49      ac_sub_cache_file=/dev/null
[f5c58361]50      _RTEMS_GIVEN_INSTALL
[eb299afc]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 \
[2e0fd427]55        $ac_sub_configure_args \
56        --srcdir=$ac_sub_srcdir \
57        --with-target-subdir=$target_subdir \
58        --cache-file=$ac_sub_cache_file
[eb299afc]59      then :
60      else
[37b5d78]61        AC_MSG_ERROR([$ac_sub_configure failed for $rtems_config_dir])
[eb299afc]62      fi
63    fi
64
[f5c58361]65    _RTEMS_POP_BUILDDIR
[eb299afc]66  done
[37b5d78]67fi],
68[
69RTEMS_BUILD_SUBDIRS="$RTEMS_BUILD_SUBDIRS"
[080afec]70rtems_configure_args="$ac_configure_args"
[eb299afc]71])
[37b5d78]72])
73
74## FIXME: This is obsolete. Only kept for backward compatibility
75AU_DEFUN([RTEMS_OUTPUT_BUILD_SUBDIRS],[])
[a0ea6f1]76
77
78dnl
79dnl Misc utility macros for subdir handling to work around missing abilities
80dnl in autoconf, automake and structural issues with RTEMS
81dnl
82dnl Contains parts derived from autoconf-2.13 AC_OUTPUT_SUBDIRS and Cygnus'
83dnl configure.in.
84dnl
85
86dnl
87dnl _RTEMS_PUSH_BUILDDIR(SUBDIR)
88dnl
89AC_DEFUN(_RTEMS_PUSH_BUILDDIR,
90[
91# _RTEMS_PUSH_BUILDDIR
92    echo configuring in $1
93    case "$srcdir" in
94    .) ;;
95    *) AS_MKDIR_P([$1])
96      ;;
97    esac
98
99    ac_popdir=`pwd`
100    cd $1
101])
102
103dnl
104dnl _RTEMS_POP_BUILDDIR
105dnl
106AC_DEFUN(_RTEMS_POP_BUILDDIR,
107[
108  cd $ac_popdir
109])
110
111dnl
112dnl _RTEMS_GIVEN_INSTALL
113dnl
114AC_DEFUN(_RTEMS_GIVEN_INSTALL,
115[
116ifdef([AC_PROVIDE_AC_PROG_INSTALL],[ 
117  case "$ac_given_INSTALL" in
118  [[\\/]]* | ?:[[\\/]]*) INSTALL="$ac_given_INSTALL" ;;
119  *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
120  esac
121])dnl
122])
123
124dnl
125dnl _RTEMS_SUB_SRCDIR(AC_CONFIG_DIR[,TARGET_SUBDIR])
126dnl
127AC_DEFUN(_RTEMS_SUB_SRCDIR,[
128# _RTEMS_SUB_SRCDIR
129    _RTEMS_ADJUST_SRCDIR(ac_sub_srcdir,$1,$2)
130
131    # Check for configure
132    if test -f $ac_sub_srcdir/configure; then
133      ac_sub_configure=$ac_sub_srcdir/configure
134    else
135      AC_MSG_WARN([no configuration information is in $1])
136      ac_sub_configure=
137    fi
138])
Note: See TracBrowser for help on using the repository browser.