source: rtems/testsuites/aclocal/rtems-top.m4 @ 70ca327

Last change on this file since 70ca327 was 70ca327, checked in by Ralf Corsepius <ralf.corsepius@…>, on 10/19/06 at 13:36:47

Adaptations to automake-1.10.

  • Property mode set to 100644
File size: 2.2 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_REQUIRE([RTEMS_VERSIONING])
11AC_REQUIRE([AM_SET_LEADING_DOT])
12AC_CONFIG_AUX_DIR([$1])
13AC_CHECK_PROGS(MAKE, gmake make)
14AC_BEFORE([$0], [AM_INIT_AUTOMAKE])dnl
15
16AC_PREFIX_DEFAULT([/opt/rtems-][RTEMS_API])
17
18## HACK to allow gnu-make conditionals in automake-Makefiles.
19ENDIF=endif
20AC_SUBST(ENDIF)
21
22AC_SUBST([RTEMS_TOPdir],["$1"])
23
24rtems_updir=m4_if([$2],[],[],[$2/])
25
26AC_ARG_ENABLE([rtems-root],[
27AS_HELP_STRING(--enable-rtems-root,directory containing make/custom)],
28[case ${enable_rtems_root} in
29  [[\\/$]]* | ?:[[\\/]]* ) # absolute directory
30   rtems_rootdir=${enable_rtems_root}
31   RTEMS_ROOT=${enable_rtems_root}
32   ;;
33  *) # relative directory
34   rtems_rootdir=${rtems_updir}${enable_rtems_root}
35   RTEMS_ROOT='$(top_builddir)'/${rtems_updir}${enable_rtems_root}
36   ;;
37esac],[
38rtems_rootdir=${rtems_updir}
39RTEMS_ROOT='$(top_builddir)'/${rtems_updir}
40])
41AC_SUBST([RTEMS_ROOT])
42
43AS_IF([test -n "${with_target_subdir}"],
44  [project_top="../${with_project_top}"],
45  [project_top="${with_project_top}"])
46AC_SUBST([PROJECT_TOPdir],[${project_top}${rtems_updir}'$(top_builddir)'])
47
48AC_ARG_ENABLE([cpukit-root],[
49AS_HELP_STRING(--enable-cpukit-root,directory containing lib/librtemscpu.a)],
50[case ${enable_cpukit_root} in
51  [[\\/$]]* | ?:[[\\/]]* ) # absolute directory
52   cpukit_rootdir=${enable_cpukit_root}
53   CPUKIT_ROOT=${enable_cpukit_root}
54   ;;
55  *) # relative directory
56   cpukit_rootdir=${rtems_updir}${enable_cpukit_root}
57   CPUKIT_ROOT='$(top_builddir)'/${rtems_updir}${enable_cpukit_root}
58   ;;
59esac],[
60cpukit_rootdir=
61CPUKIT_ROOT=
62])
63AC_SUBST([CPUKIT_ROOT])
64
65AC_ARG_ENABLE([project-root],[
66AS_HELP_STRING(--enable-project-root,directory containing lib/librtemsbsp.a)],
67[case ${enable_project_root} in
68  [[\\/$]]* | ?:[[\\/]]* ) # absolute directory
69   project_rootdir=${enable_project_root}
70   PROJECT_ROOT=${enable_project_root}
71   ;;
72  *) # relative directory
73   project_rootdir=${rtems_updir}${enable_project_root}
74   PROJECT_ROOT='$(top_builddir)'/${rtems_updir}${enable_project_root}
75   ;;
76esac],[
77project_rootdir=
78PROJECT_ROOT=
79])
80AC_SUBST([PROJECT_ROOT])
81])dnl
Note: See TracBrowser for help on using the repository browser.