source: rtems/aclocal/config-subdirs.m4 @ ba748523

4.104.114.84.95
Last change on this file since ba748523 was ba748523, checked in by Joel Sherrill <joel.sherrill@…>, on Dec 20, 2001 at 5:33:23 PM

2001-12-20 Ralf Corsepius <corsepiu@…>

  • configure.ac: Reworked for multilibs, reflect changes to aclocal/*.m4.
  • aclocal/subdirs.m4: New file.
  • aclocal/multi.m4: New file, adopted from autoconf-2.52 w/ modifications.
  • aclocal/check-posix.m4: Apply AS_IF.
  • aclocal/config-subdirs.m4: Reflect changes to other m4-macros.
  • aclocal/env-rtemsbsp.m4: Add PROJECT_INCLUDE, PROJECT_RELEASE. Add AM_CONDITIONAL(MULTILIB). Adapt GCC_SPECS to multilibs.
  • aclocal/env-rtemscpu.m4: Remove RTEMS_BSP. Add support for MULTIBUILDTOP, MULTISUBDIR. Adapt GCC_SPECS to multilibs. Add PROJECT_INCLUDE, PROJECT_RELEASE, includedir, libdir.
  • aclocal/multilib.m4: Fix m4-quoting, adopt automake-1.5's OUTPUT_COMMANDS.
  • aclocal/project-root.m4: Remove PROJECT_INCLUDE, PROJECT_RELEASE.
  • aclocal/rtems-debug.m4: Minor cleanups.
  • aclocal/rtems-top.m4: Minor cleanups.
  • automake/compile.am: Further steps towards automake's rules.
  • Property mode set to 100644
File size: 1.7 KB
Line 
1dnl $Id$
2
3dnl
4dnl Misc utility macros for subdir handling to work around missing abilities
5dnl in autoconf, automake and structural issues with RTEMS
6dnl
7dnl Contains parts derived from autoconf-2.13 AC_OUTPUT_SUBDIRS and Cygnus'
8dnl configure.in.
9dnl
10
11dnl
12dnl _RTEMS_PUSH_BUILDDIR(SUBDIR)
13dnl
14AC_DEFUN(_RTEMS_PUSH_BUILDDIR,
15[
16# _RTEMS_PUSH_BUILDDIR
17    echo configuring in $1
18    case "$srcdir" in
19    .) ;;
20    *) AS_MKDIR_P([$1])
21      ;;
22    esac
23
24    ac_popdir=`pwd`
25    cd $1
26])
27
28dnl
29dnl _RTEMS_POP_BUILDDIR
30dnl
31AC_DEFUN(_RTEMS_POP_BUILDDIR,
32[
33  cd $ac_popdir
34])
35
36dnl
37dnl _RTEMS_GIVEN_INSTALL
38dnl
39AC_DEFUN(_RTEMS_GIVEN_INSTALL,
40[
41ifdef([AC_PROVIDE_AC_PROG_INSTALL],[ 
42  case "$ac_given_INSTALL" in
43  [[\\/]]* | ?:[[\\/]]*) INSTALL="$ac_given_INSTALL" ;;
44  *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
45  esac
46])dnl
47])
48
49dnl
50dnl _AC_DOTS(PATH)
51dnl
52AC_DEFUN(_AC_DOTS,[
53# A "../" for each directory in $1.
54    ac_dots=`echo $1 | \
55             sed -e 's%^\./%%' -e 's%[[^/]]$%&/%' -e 's%[[^/]]*/%../%g'`
56])
57
58dnl
59dnl _RTEMS_ADJUST_SRCDIR(REVAR,CONFIG_DIR[,TARGET_SUBDIR])
60dnl
61AC_DEFUN(_RTEMS_ADJUST_SRCDIR,[
62    _AC_DOTS(ifelse([$3], ,[$2],[$3/$2]))
63
64    case "$srcdir" in
65    .) # No --srcdir option.  We are building in place.
66      $1=$srcdir ;;
67    [[\\/]]* | ?:[[\\/]]*) # Absolute path.
68      $1=$srcdir/$2 ;;
69    *) # Relative path.
70      $1=$ac_dots$srcdir/$2 ;;
71    esac
72])
73
74dnl
75dnl _RTEMS_SUB_SRCDIR(AC_CONFIG_DIR[,TARGET_SUBDIR])
76dnl
77AC_DEFUN(_RTEMS_SUB_SRCDIR,[
78# _RTEMS_SUB_SRCDIR
79    _RTEMS_ADJUST_SRCDIR(ac_sub_srcdir,$1,$2)
80
81    # Check for configure
82    if test -f $ac_sub_srcdir/configure; then
83      ac_sub_configure=$ac_sub_srcdir/configure
84    else
85      AC_MSG_WARN([no configuration information is in $1])
86      ac_sub_configure=
87    fi
88])
Note: See TracBrowser for help on using the repository browser.