source: rtems/c/src/aclocal/rtems-top.m4 @ ac3786b

4.104.114.84.95
Last change on this file since ac3786b was ac3786b, checked in by Ralf Corsepius <ralf.corsepius@…>, on 08/29/03 at 00:06:15

2003-08-28 Ralf Corsepius <corsepiu@…>

  • aclocal/rtems-top.m4: Add RTEMS_API. AC_DEFAULT_PREFIX(opt/rtems-[RTEMS_API]).
  • Property mode set to 100644
File size: 1.1 KB
RevLine 
[867ab080]1dnl $Id$
2
[ac3786b]3m4_define([RTEMS_API],[4.7])
4
[867ab080]5dnl
6dnl RTEMS_TOP($1)
7dnl
8dnl $1 .. relative path from this configure.in to the toplevel configure.in
9dnl
10AC_DEFUN(RTEMS_TOP,
11[dnl
12AC_REQUIRE([RTEMS_VERSIONING])
13AC_CONFIG_AUX_DIR([$1])
14AC_CHECK_PROGS(MAKE, gmake make)
15AC_BEFORE([$0], [AM_INIT_AUTOMAKE])dnl
16
[ac3786b]17AC_PREFIX_DEFAULT([/opt/rtems-][RTEMS_API])
[867ab080]18
19## HACK to allow gnu-make conditionals in automake-Makefiles.
20ENDIF=endif
21AC_SUBST(ENDIF)
22
23RTEMS_TOPdir="$1";
24AC_SUBST(RTEMS_TOPdir)
25
26## with_target_subdirs is handled implicitly by autoconf
27test -n "$with_target_subdir" || with_target_subdir="."
28
29if test "$with_target_subdir" = "." ; then
30# Native
31PROJECT_TOPdir=${RTEMS_TOPdir}/'$(top_builddir)'
32else
33# Cross
34dots=`echo $with_target_subdir|\
35sed -e 's%^\./%%' -e 's%[[^/]]$%&/%' -e 's%[[^/]]*/%../%g'`
36PROJECT_TOPdir=${dots}${RTEMS_TOPdir}/'$(top_builddir)'
37fi
38AC_SUBST(PROJECT_TOPdir)
39
40PROJECT_ROOT="${RTEMS_TOPdir}/\$(top_builddir)"
41AC_SUBST(PROJECT_ROOT)
42
43AC_MSG_CHECKING([for RTEMS Version])
44AS_IF([test -r "${srcdir}/${RTEMS_TOPdir}/aclocal/version.m4"],
45[],
46[AC_MSG_ERROR([Unable to find ${RTEMS_TOPdir}/aclocal/version.m4])])
47AC_MSG_RESULT([_RTEMS_VERSION])
48])dnl
Note: See TracBrowser for help on using the repository browser.