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