[66387986] | 1 | ## Process this file with autoconf to produce a configure script. |
---|
| 2 | ## |
---|
| 3 | ## $Id$ |
---|
[eb299afc] | 4 | |
---|
[66387986] | 5 | AC_PREREQ(2.52) |
---|
[f31a078] | 6 | AC_INIT([rtems-cpukit],[_RTEMS_VERSION],[rtems-bugs@OARcorp.com]) |
---|
[66387986] | 7 | AC_CONFIG_SRCDIR([score]) |
---|
[51b4875] | 8 | RTEMS_TOP(..) |
---|
[15c107ff] | 9 | AC_CONFIG_AUX_DIR(..) |
---|
[eb299afc] | 10 | |
---|
| 11 | RTEMS_CANONICAL_TARGET_CPU |
---|
| 12 | |
---|
[56a1ae36] | 13 | AM_INIT_AUTOMAKE([no-define nostdinc foreign 1.6]) |
---|
[eb299afc] | 14 | AM_MAINTAINER_MODE |
---|
[04e6f7bf] | 15 | |
---|
| 16 | RTEMS_ENABLE_MULTILIB |
---|
[eb299afc] | 17 | RTEMS_ENABLE_MULTIPROCESSING |
---|
| 18 | RTEMS_ENABLE_POSIX |
---|
[352c9b2] | 19 | RTEMS_ENABLE_ITRON |
---|
[eb299afc] | 20 | RTEMS_ENABLE_INLINES |
---|
[39607984] | 21 | RTEMS_ENABLE_RTEMS_DEBUG |
---|
[3e39b47] | 22 | RTEMS_ENABLE_NETWORKING |
---|
[eb299afc] | 23 | |
---|
[04e6f7bf] | 24 | RTEMS_ENV_RTEMSCPU |
---|
[39607984] | 25 | RTEMS_CHECK_RTEMS_DEBUG |
---|
[eb299afc] | 26 | |
---|
| 27 | RTEMS_CHECK_CPU |
---|
| 28 | RTEMS_CANONICAL_HOST |
---|
| 29 | |
---|
[53c3a2c6] | 30 | RTEMS_PROG_CC_FOR_TARGET([-ansi -fasm]) |
---|
[eb299afc] | 31 | RTEMS_CANONICALIZE_TOOLS |
---|
[e73e576] | 32 | AC_PROG_RANLIB |
---|
[eb299afc] | 33 | |
---|
| 34 | RTEMS_CHECK_NEWLIB |
---|
| 35 | |
---|
[27f9f12] | 36 | RTEMS_CHECK_MULTIPROCESSING |
---|
| 37 | RTEMS_CHECK_POSIX_API |
---|
| 38 | RTEMS_CHECK_ITRON_API |
---|
[3e39b47] | 39 | RTEMS_CHECK_NETWORKING |
---|
[1896a650] | 40 | |
---|
[eb299afc] | 41 | # If RTEMS macros are enabled, then use them. Otherwise, use inlines. |
---|
[8217c40] | 42 | AS_IF([test "$RTEMS_USE_MACROS" = "yes"], |
---|
| 43 | [INLINEdir="macros"], |
---|
| 44 | [INLINEdir="inline"]) |
---|
| 45 | |
---|
| 46 | AM_CONDITIONAL(INLINE,test x"$INLINEdir" = x"inline" ) |
---|
| 47 | AM_CONDITIONAL(MACROS,test x"$INLINEdir" = x"macros" ) |
---|
| 48 | AM_CONDITIONAL(HAS_MP,test x"$HAS_MP" = x"yes" ) |
---|
[1896a650] | 49 | |
---|
[e1d8abb] | 50 | AC_SUBST(RTEMS_VERSION) |
---|
[1896a650] | 51 | |
---|
[8217c40] | 52 | AM_CONDITIONAL(HAS_POSIX,test x"$HAS_POSIX_API" = x"yes") |
---|
| 53 | AM_CONDITIONAL(HAS_ITRON,test x"$HAS_ITRON_API" = x"yes") |
---|
[3e39b47] | 54 | AM_CONDITIONAL(HAS_NETWORKING,test x"$HAS_NETWORKING" = x"yes") |
---|
[eb299afc] | 55 | |
---|
[8217c40] | 56 | AS_IF([test x"$HAS_POSIX_API" = x"yes"], |
---|
| 57 | [AC_CONFIG_SUBDIRS([posix])] |
---|
| 58 | ) |
---|
| 59 | AS_IF([test x"$HAS_ITRON_API" = x"yes"], |
---|
| 60 | [AC_CONFIG_SUBDIRS(itron)] |
---|
| 61 | ) |
---|
[7660ccd8] | 62 | RTEMS_CPU_SUBDIRS([score/cpu]) |
---|
[2a582aa5] | 63 | # FIXME: All ports should have a libscorecpu.a - But the powerpc doesn't! |
---|
| 64 | AM_CONDITIONAL([LIBSCORECPU], |
---|
| 65 | [test -f "${srcdir}/score/cpu/${RTEMS_CPU}/cpu.c"]) |
---|
[eb299afc] | 66 | |
---|
[90926129] | 67 | AC_CONFIG_SUBDIRS([libcsupport]) |
---|
[35cd6ae] | 68 | AC_CONFIG_SUBDIRS([libblock]) |
---|
| 69 | AC_CONFIG_SUBDIRS([libfs]) |
---|
[85eb57e7] | 70 | AS_IF([test x"$HAS_NETWORKING" = x"yes"],[ |
---|
| 71 | AC_CONFIG_SUBDIRS(libnetworking) |
---|
| 72 | ## FIXME: Should better use a feature-based test |
---|
[e336882] | 73 | AC_MSG_CHECKING([whether CPU supports librpc]) |
---|
[85eb57e7] | 74 | case "$RTEMS_CPU" in |
---|
| 75 | c4x ) LIBRPC=no;; |
---|
| 76 | or32 ) LIBRPC=no;; |
---|
| 77 | * ) LIBRPC=yes;; |
---|
| 78 | esac |
---|
[e336882] | 79 | AC_MSG_RESULT([$LIBRPC]) |
---|
| 80 | AS_IF([test "$LIBRPC" = "yes"], |
---|
[85eb57e7] | 81 | [AC_CONFIG_SUBDIRS([librpc]) |
---|
[2a582aa5] | 82 | ]) |
---|
| 83 | ]) |
---|
| 84 | AM_CONDITIONAL(LIBRPC,[test "$LIBRPC" = "yes"]) |
---|
[90926129] | 85 | |
---|
[965c49b2] | 86 | AC_ARG_ENABLE([ada], |
---|
| 87 | [AC_HELP_STRING([--enable-ada],[enable ada support])], |
---|
| 88 | [case "${enable_ada}" in |
---|
| 89 | yes) ;; |
---|
| 90 | no) ;; |
---|
| 91 | *) AC_MSG_ERROR([bad value ${enable_ada} for --enable-ada]) ;; |
---|
| 92 | esac],[enable_ada=no]) |
---|
| 93 | |
---|
[97b4bc1] | 94 | AS_IF([test x"$enable_ada" = x"yes"],[ |
---|
[f31a078] | 95 | AS_IF([test x"$HAS_POSIX_API" = x"yes"],[ |
---|
[97b4bc1] | 96 | AC_CONFIG_SUBDIRS([ada]) |
---|
| 97 | ]) |
---|
| 98 | ]) |
---|
| 99 | |
---|
[b8a30d07] | 100 | RTEMS_DEFINE_POSIX_API |
---|
| 101 | RTEMS_DEFINE_ITRON_API |
---|
| 102 | RTEMS_DEFINE_MULTIPROCESSING |
---|
| 103 | |
---|
[c0394d4b] | 104 | # HACK: We should use a feature-based configuration. |
---|
[8217c40] | 105 | AS_IF([test x"${RTEMS_CPU}" = x"unix"],[ |
---|
[64b1f81] | 106 | AC_DEFINE_UNQUOTED([RTEMS_UNIX],[1],[to indicate RTEMS unix]) |
---|
[8217c40] | 107 | # HACK: silently accept --enable-unixlib |
---|
[64b1f81] | 108 | test -n "${enable_unixlib}" || enable_unixlib="yes" |
---|
[8217c40] | 109 | ]) |
---|
| 110 | |
---|
[35cd6ae] | 111 | AM_CONDITIONAL(UNIX,[test x"${RTEMS_CPU}" = x"unix"]) |
---|
| 112 | |
---|
[8217c40] | 113 | AS_IF([test x"${enable_unixlib}" = x"yes"], |
---|
[64b1f81] | 114 | [AC_DEFINE_UNQUOTED([RTEMS_UNIXLIB],[1], |
---|
[8217c40] | 115 | [to indicate RTEMS using RTEMS's unixlib])] |
---|
| 116 | ) |
---|
[c0394d4b] | 117 | |
---|
[f31a078] | 118 | |
---|
| 119 | AM_CONFIG_HEADER([score/include/rtems/score/cpuopts-tmp.h],[ |
---|
| 120 | echo "/* target cpu dependent options file */" >$tmp/config.h |
---|
| 121 | echo "/* automatically generated -- DO NOT EDIT!! */" >>$tmp/config.h |
---|
| 122 | echo >>$tmp/config.h |
---|
| 123 | echo "#ifndef __CPU_OPTIONS_h" >>$tmp/config.h |
---|
| 124 | echo "#define __CPU_OPTIONS_h" >>$tmp/config.h |
---|
| 125 | echo >>$tmp/config.h |
---|
| 126 | sed -e '/.*PACKAGE.*/d' score/include/rtems/score/cpuopts-tmp.h >> $tmp/config.h |
---|
| 127 | echo >>$tmp/config.h |
---|
| 128 | echo "#endif" >>$tmp/config.h |
---|
| 129 | AS_IF([cmp -s score/include/rtems/score/cpuopts.h $tmp/config.h 2>/dev/null], |
---|
| 130 | [AC_MSG_NOTICE([score/include/rtems/score/cpuopts.h is unchanged]) |
---|
| 131 | rm -f $tmp/config.h], |
---|
| 132 | [AC_MSG_NOTICE([creating score/include/rtems/score/cpuopts.h]) |
---|
| 133 | rm -f score/include/rtems/score/cpuopts.h |
---|
| 134 | mv $tmp/config.h score/include/rtems/score/cpuopts.h]) |
---|
| 135 | ]) |
---|
[e0ba3e8] | 136 | |
---|
[8217c40] | 137 | AC_ENABLE_MULTILIB([Makefile],[..]) |
---|
| 138 | |
---|
[64b1f81] | 139 | ## HACK: Add a define to cpuopts.h to indicate using multilibs |
---|
| 140 | ## Can be applied to produce compiler errors if using |
---|
| 141 | ## multilib-incompatible settings somewhere else (eg. bspopts.h). |
---|
| 142 | AS_IF([test x"${enable_multilib}" = x"yes"],[ |
---|
| 143 | AC_DEFINE_UNQUOTED([RTEMS_MULTILIBS],[1],[using multilib'ed RTEMS]) |
---|
| 144 | ]) |
---|
| 145 | |
---|
[70810dc] | 146 | # Explicitly list all Makefiles here |
---|
[66387986] | 147 | AC_CONFIG_FILES([Makefile |
---|
[8217c40] | 148 | include/Makefile |
---|
[1896a650] | 149 | rtems/Makefile |
---|
| 150 | rtems/src/Makefile |
---|
| 151 | rtems/include/Makefile |
---|
[e1d8abb] | 152 | rtems/inline/Makefile |
---|
| 153 | rtems/macros/Makefile |
---|
[1896a650] | 154 | sapi/Makefile |
---|
| 155 | sapi/src/Makefile |
---|
| 156 | sapi/include/Makefile |
---|
| 157 | sapi/include/rtems/sptables.h |
---|
[e1d8abb] | 158 | sapi/inline/Makefile |
---|
| 159 | sapi/macros/Makefile |
---|
[eb299afc] | 160 | score/Makefile |
---|
| 161 | score/cpu/Makefile |
---|
| 162 | score/include/Makefile |
---|
[e1d8abb] | 163 | score/inline/Makefile |
---|
| 164 | score/macros/Makefile |
---|
[eb299afc] | 165 | score/src/Makefile |
---|
[029527b6] | 166 | wrapup/Makefile |
---|
[66387986] | 167 | ]) |
---|
| 168 | AC_OUTPUT |
---|