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

4.104.114.84.95
Last change on this file since 82bdc057 was 82bdc057, checked in by Ralf Corsepius <ralf.corsepius@…>, on 12/01/03 at 06:29:27

2003-12-01 Ralf Corsepius <corsepiu@…>

  • aclocal/lead-dot.m4: New (from automake-1.7f).
  • aclocal/rtems-top.m4: Require AM_SET_LEADING_DOT. Add AC_SUBST(dirstamp).
  • Property mode set to 100644
File size: 1.2 KB
Line 
1dnl $Id$
2
3m4_define([RTEMS_API],[4.7])
4
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_REQUIRE([AM_SET_LEADING_DOT])
14AC_CONFIG_AUX_DIR([$1])
15AC_CHECK_PROGS(MAKE, gmake make)
16AC_BEFORE([$0], [AM_INIT_AUTOMAKE])dnl
17
18AC_PREFIX_DEFAULT([/opt/rtems-][RTEMS_API])
19
20## HACK to allow gnu-make conditionals in automake-Makefiles.
21ENDIF=endif
22AC_SUBST(ENDIF)
23
24RTEMS_TOPdir="$1";
25AC_SUBST(RTEMS_TOPdir)
26
27## with_target_subdirs is handled implicitly by autoconf
28test -n "$with_target_subdir" || with_target_subdir="."
29
30if test "$with_target_subdir" = "." ; then
31# Native
32PROJECT_TOPdir=${RTEMS_TOPdir}/'$(top_builddir)'
33else
34# Cross
35dots=`echo $with_target_subdir|\
36sed -e 's%^\./%%' -e 's%[[^/]]$%&/%' -e 's%[[^/]]*/%../%g'`
37PROJECT_TOPdir=${dots}${RTEMS_TOPdir}/'$(top_builddir)'
38fi
39AC_SUBST(PROJECT_TOPdir)
40
41PROJECT_ROOT="${RTEMS_TOPdir}/\$(top_builddir)"
42AC_SUBST(PROJECT_ROOT)
43
44AC_MSG_CHECKING([for RTEMS Version])
45AS_IF([test -r "${srcdir}/${RTEMS_TOPdir}/aclocal/version.m4"],
46[],
47[AC_MSG_ERROR([Unable to find ${RTEMS_TOPdir}/aclocal/version.m4])])
48AC_MSG_RESULT([_RTEMS_VERSION])
49
50AC_SUBST([dirstamp],[\${am__leading_dot}dirstamp])
51])dnl
Note: See TracBrowser for help on using the repository browser.