source: rtems/aclocal/rtems-top.m4 @ f92cc34

4.104.114.84.95
Last change on this file since f92cc34 was e712997, checked in by Joel Sherrill <joel.sherrill@…>, on 09/13/01 at 13:14:30

2001-07-19 Ralf Corsepius <corsepiu@…>

  • configure.in: autoupdate to autoconf-2.52.
  • bootstrap: Add handling for configure.ac, make autoheader verbose, fix auto*tool invocation order.
  • aclocal/rtems-test-no-pause.m4: Introduce AC_HELP_STRING.
  • aclocal/enable-bare.m4: Introduce AC_HELP_STRING.
  • aclocal/enable-cxx.m4: Introduce AC_HELP_STRING.
  • aclocal/enable-gcc28: Introduce AC_HELP_STRING.
  • aclocal/enable-inlines.m4: Introduce AC_HELP_STRING.
  • aclocal/enable-itron.m4: Introduce AC_HELP_STRING.
  • aclocal/enable-libcdir.m4: Introduce AC_HELP_STRING.
  • aclocal/enable-multiprocessing.m4: Introduce AC_HELP_STRING.
  • aclocal/enable-networking.m4: Introduce AC_HELP_STRING.
  • aclocal/enable-posix.m4: Introduce AC_HELP_STRING.
  • aclocal/enable-rdbg.m4: Introduce AC_HELP_STRING.
  • aclocal/enable-rtemsbsp.m4: Introduce AC_HELP_STRING.
  • aclocal/enable-tests.m4: Introduce AC_HELP_STRING.
  • aclocal/env-rtemsbsp.m4: Add AC_ARC_VAR(RTEMS_BSP), apply true in RTEMS_CONFIG_PER_BSP conditional.
  • aclocal/multilib.m4: Introduce AC_HELP_STRING.
  • aclocal/rtems-debug.m4: Introduce AC_HELP_STRING.
  • aclocal/rtems-top.m4: Add AC_PREFIX_DEFAULT(/opt/rtems).
  • 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.