1 | dnl Process this file with autoconf to produce a configure script. |
---|
2 | dnl |
---|
3 | dnl $Id$ |
---|
4 | |
---|
5 | AC_PREREQ(2.52) |
---|
6 | AC_INIT |
---|
7 | AC_CONFIG_SRCDIR([c]) |
---|
8 | RTEMS_TOP(.) |
---|
9 | |
---|
10 | # Abort if trying to build inside of the source tree. |
---|
11 | if test -f VERSION; then |
---|
12 | rm -f config.cache config.log confdefs.h |
---|
13 | AC_MSG_ERROR([***] |
---|
14 | [Attempt to build inside of the source tree] |
---|
15 | [Please use a separate build directory, instead] ) |
---|
16 | fi |
---|
17 | |
---|
18 | AC_CANONICAL_TARGET([]) |
---|
19 | AM_INIT_AUTOMAKE(rtems,$RTEMS_VERSION,no) |
---|
20 | AM_MAINTAINER_MODE |
---|
21 | |
---|
22 | dnl These option are only in here to let --help report all supported |
---|
23 | dnl options. |
---|
24 | RTEMS_ENABLE_MULTIPROCESSING |
---|
25 | RTEMS_ENABLE_POSIX |
---|
26 | RTEMS_ENABLE_ITRON |
---|
27 | RTEMS_ENABLE_NETWORKING |
---|
28 | RTEMS_ENABLE_RDBG |
---|
29 | RTEMS_ENABLE_INLINES |
---|
30 | RTEMS_ENABLE_CXX |
---|
31 | RTEMS_ENABLE_GCC28 |
---|
32 | RTEMS_ENABLE_LIBCDIR |
---|
33 | RTEMS_ENABLE_TESTS |
---|
34 | RTEMS_ENABLE_RTEMS_DEBUG |
---|
35 | RTEMS_ENABLE_RTEMSBSP(dummy) |
---|
36 | |
---|
37 | if test $host != $build; then |
---|
38 | AC_MSG_WARN([] |
---|
39 | [*** *** *** WARNING *** *** ***] |
---|
40 | [] |
---|
41 | [Entering BEYOND BLEEDING EDGE TERRITORY] |
---|
42 | [] |
---|
43 | [You are trying to build RTEMS Canadian cross] |
---|
44 | [If you really mean it, feel free to continue ...] |
---|
45 | [*** *** *** *** *** *** *** ***]) |
---|
46 | fi |
---|
47 | |
---|
48 | ## NOTES: |
---|
49 | ## The tools/*-directories situation is unclear |
---|
50 | ## * tools/build are host-native tools to be installed on the host. |
---|
51 | ## * tools/cpu are host-native or host-cross-target-tools |
---|
52 | ## * tools/update are build-host-native tools |
---|
53 | |
---|
54 | # these tools are built for the build environment |
---|
55 | # |
---|
56 | build_tools="tools/update" |
---|
57 | |
---|
58 | # these libraries are built for the host environment |
---|
59 | # |
---|
60 | host_libs="" |
---|
61 | |
---|
62 | # these tools are built for the host environment |
---|
63 | # |
---|
64 | host_tools="tools/build tools/cpu" |
---|
65 | |
---|
66 | # these libraries are built for the target environment, and are built after |
---|
67 | # the host libraries and the host tools (which may be a cross compiler) |
---|
68 | # |
---|
69 | target_libs="c" |
---|
70 | |
---|
71 | # these tools are built using the target libs, and are intended to run only |
---|
72 | # in the target environment |
---|
73 | # |
---|
74 | target_tools="" |
---|
75 | |
---|
76 | ## All tools belong in one of the five categories, and are assigned above. |
---|
77 | ## ${host_configdirs} is directories we build using the host tools. |
---|
78 | ## ${target_configdirs} is directories we build using the target tools. |
---|
79 | # |
---|
80 | host_configdirs="${host_libs} ${host_tools}" |
---|
81 | AC_SUBST(host_configdirs) |
---|
82 | |
---|
83 | target_configdirs="${target_libs} ${target_tools}" |
---|
84 | AC_SUBST(target_configdirs) |
---|
85 | |
---|
86 | RTEMS_TARGET_CONFIG_PREPARE |
---|
87 | target_subdir=${target_alias} |
---|
88 | |
---|
89 | RTEMS_HOST_CONFIG_PREPARE |
---|
90 | host_subdir=${host_alias} |
---|
91 | |
---|
92 | if test $build = $host; |
---|
93 | then |
---|
94 | BUILD_SUBDIRS="$build_tools $host_configdirs" |
---|
95 | |
---|
96 | if test $build = $target; |
---|
97 | then |
---|
98 | BUILD_SUBDIRS="$BUILD_SUBDIRS $target_configdirs"; |
---|
99 | else |
---|
100 | TARGET_SUBDIRS=`echo "$target_configdirs" | \ |
---|
101 | sed -e "s%\([[^ ]][[^ ]]*\)%$target_alias/\1%g"` |
---|
102 | fi |
---|
103 | else |
---|
104 | ## If building Canadian cross, disable the target directories |
---|
105 | target_configdirs="" |
---|
106 | BUILD_SUBDIRS="$build_tools" |
---|
107 | TARGET_SUBDIRS=`echo "$host_configdirs" | \ |
---|
108 | sed -e "s%\([[^ ]][[^ ]]*\)%$host_alias/\1%g"` |
---|
109 | fi |
---|
110 | |
---|
111 | AC_CONFIG_SUBDIRS($BUILD_SUBDIRS) |
---|
112 | AC_SUBST(TARGET_SUBDIRS) |
---|
113 | AC_SUBST(BUILD_SUBDIRS) |
---|
114 | |
---|
115 | AC_CONFIG_FILES([Makefile |
---|
116 | tools/Makefile |
---|
117 | make/Makefile |
---|
118 | make/custom/Makefile |
---|
119 | make/Templates/Makefile |
---|
120 | make/compilers/Makefile |
---|
121 | doc/Makefile]) |
---|
122 | AC_OUTPUT |
---|
123 | |
---|
124 | RTEMS_TARGET_CONFIG_SUBDIRS |
---|
125 | RTEMS_HOST_CONFIG_SUBDIRS |
---|