source: rtems/aclocal/rtems-top.m4 @ 8fec915

4.104.114.84.95
Last change on this file since 8fec915 was ba748523, checked in by Joel Sherrill <joel.sherrill@…>, on 12/20/01 at 17:33:23

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.5 KB
Line 
1dnl $Id$
2
3dnl
4dnl RTEMS_TOP($1)
5dnl
6dnl $1 .. relative path from this configure.in to the toplevel configure.in
7dnl
8AC_DEFUN(RTEMS_TOP,
9[dnl
10AC_CHECK_PROGS(MAKE, gmake make)
11AC_BEFORE([$0], [AC_CONFIG_AUX_DIR])dnl
12AC_BEFORE([$0], [AM_INIT_AUTOMAKE])dnl
13
14AC_PREFIX_DEFAULT([/opt/rtems])
15
16## HACK to allow gnu-make conditionals in automake-Makefiles.
17ENDIF=endif
18AC_SUBST(ENDIF)
19
20RTEMS_TOPdir="$1";
21AC_SUBST(RTEMS_TOPdir)
22
23## with_target_subdirs is handled implicitly by autoconf
24test -n "$with_target_subdir" || with_target_subdir="."
25
26if test "$with_target_subdir" = "." ; then
27# Native
28PROJECT_TOPdir=${RTEMS_TOPdir}/'$(top_builddir)'
29else
30# Cross
31dots=`echo $with_target_subdir|\
32sed -e 's%^\./%%' -e 's%[[^/]]$%&/%' -e 's%[[^/]]*/%../%g'`
33PROJECT_TOPdir=${dots}${RTEMS_TOPdir}/'$(top_builddir)'
34fi
35AC_SUBST(PROJECT_TOPdir)
36
37if test "$with_target_subdir" = "." ; then
38# Native
39PROJECT_ROOT="${RTEMS_TOPdir}/\$(top_builddir)"
40else
41# Cross
42PROJECT_ROOT="${RTEMS_TOPdir}/\$(top_builddir)"
43fi
44AC_SUBST(PROJECT_ROOT)
45
46dnl Determine RTEMS Version string from the VERSION file
47dnl Hopefully, Joel never changes its format ;-
48AC_MSG_CHECKING([for RTEMS Version])
49if test -r "${srcdir}/${RTEMS_TOPdir}/VERSION"; then
50RTEMS_VERSION=`grep 'RTEMS Version' ${srcdir}/${RTEMS_TOPdir}/VERSION | \
51sed -e 's%RTEMS[[       ]]*Version[[    ]]*\(.*\)[[     ]]*%\1%g'`
52else
53AC_MSG_ERROR(Unable to find ${RTEMS_TOPdir}/VERSION)
54fi
55if test -z "$RTEMS_VERSION"; then
56AC_MSG_ERROR(Unable to determine version)
57fi
58AC_MSG_RESULT($RTEMS_VERSION)
59])dnl
Note: See TracBrowser for help on using the repository browser.