[254b4450] | 1 | dnl Process this file with autoconf to produce a configure script. |
---|
[6f9c75c3] | 2 | dnl |
---|
| 3 | dnl $Id$ |
---|
| 4 | |
---|
[254b4450] | 5 | AC_PREREQ(2.12) |
---|
| 6 | AC_INIT(README) |
---|
| 7 | |
---|
| 8 | dnl Checks for programs. |
---|
| 9 | AC_PROG_MAKE_SET |
---|
| 10 | AC_CANONICAL_SYSTEM |
---|
| 11 | AC_ARG_WITH(cross-host,[ --with-cross-host=HOST host (cygnus)], \ |
---|
| 12 | host=$withval) |
---|
| 13 | |
---|
[91333c2] | 14 | AC_ARG_ENABLE(gmake-print-directory, \ |
---|
| 15 | [ --enable-gmake-print-directory enable GNU Make's print directory], \ |
---|
| 16 | [case "${enableval}" in |
---|
[39ffc7d] | 17 | yes) RTEMS_USE_OWN_PDIR=no ;; |
---|
| 18 | no) RTEMS_USE_OWN_PDIR=yes ;; |
---|
[91333c2] | 19 | *) AC_MSG_ERROR(bad value ${enableval} for gmake-print-directory option) ;; |
---|
| 20 | esac],[RTEMS_USE_OWN_PDIR=yes]) |
---|
| 21 | |
---|
[97e2729d] | 22 | AC_ARG_ENABLE(multiprocessing, \ |
---|
| 23 | [ --enable-multiprocessing enable multiprocessing interface], \ |
---|
| 24 | [case "${enableval}" in |
---|
| 25 | yes) RTEMS_HAS_MULTIPROCESSING=yes ;; |
---|
| 26 | no) RTEMS_HAS_MULTIPROCESSING=no ;; |
---|
| 27 | *) AC_MSG_ERROR(bad value ${enableval} for enable-multiprocessing option) ;; |
---|
| 28 | esac],[RTEMS_HAS_MULTIPROCESSING=no]) |
---|
| 29 | |
---|
[254b4450] | 30 | AC_ARG_ENABLE(posix, \ |
---|
[ba1a2af9] | 31 | [ --enable-posix enable posix interface], \ |
---|
[69df7da] | 32 | [case "${enableval}" in |
---|
| 33 | yes) RTEMS_HAS_POSIX_API=yes ;; |
---|
| 34 | no) RTEMS_HAS_POSIX_API=no ;; |
---|
[ba1a2af9] | 35 | *) AC_MSG_ERROR(bad value ${enableval} for enable-posix option) ;; |
---|
[69df7da] | 36 | esac],[RTEMS_HAS_POSIX_API=yes]) |
---|
[254b4450] | 37 | |
---|
[0280cb6] | 38 | AC_ARG_ENABLE(networking, \ |
---|
| 39 | [ --enable-networking enable TCP/IP stack], \ |
---|
| 40 | [case "${enableval}" in |
---|
| 41 | yes) RTEMS_HAS_NETWORKING=yes ;; |
---|
| 42 | no) RTEMS_HAS_NETWORKING=no ;; |
---|
| 43 | *) AC_MSG_ERROR(bad value ${enableval} for enable-networking option) ;; |
---|
| 44 | esac],[RTEMS_HAS_NETWORKING=yes]) |
---|
[1f0f3e35] | 45 | |
---|
[4721cf1] | 46 | AC_ARG_ENABLE(rdbg, \ |
---|
| 47 | [ --enable-rdbg enable remote debugger], \ |
---|
| 48 | [case "${enableval}" in |
---|
| 49 | yes) RTEMS_HAS_RDBG=yes ;; |
---|
| 50 | no) RTEMS_HAS_RDBG=no ;; |
---|
| 51 | *) AC_MSG_ERROR(bad value ${enableval} for enable-rdbg option) ;; |
---|
[cca4400] | 52 | esac],[RTEMS_HAS_RDBG=no]) |
---|
[4721cf1] | 53 | |
---|
[254b4450] | 54 | AC_ARG_ENABLE(rtems-inlines, \ |
---|
[e9e01dd6] | 55 | [ --enable-rtems-inlines enable RTEMS inline functions, the default (disable to use macros)], \ |
---|
[69df7da] | 56 | [case "${enableval}" in |
---|
[ba1a2af9] | 57 | yes) RTEMS_USE_MACROS=no ;; |
---|
| 58 | no) RTEMS_USE_MACROS=yes ;; |
---|
[69df7da] | 59 | *) AC_MSG_ERROR(bad value ${enableval} for disable-rtems-inlines option) ;; |
---|
| 60 | esac],[RTEMS_USE_MACROS=no]) |
---|
[254b4450] | 61 | |
---|
[3771cc6e] | 62 | AC_ARG_ENABLE(cxx, \ |
---|
| 63 | [ --enable-cxx enable C++ support, and build the rtems++ library], \ |
---|
[3f70e3c] | 64 | [case "${enableval}" in |
---|
[91333c2] | 65 | yes) RTEMS_HAS_CPLUSPLUS=yes ;; |
---|
[37717818] | 66 | no) RTEMS_HAS_CPLUSPLUS=no ;; |
---|
[3771cc6e] | 67 | *) AC_MSG_ERROR(bad value ${enableval} for enable-cxx option) ;; |
---|
[37717818] | 68 | esac], [RTEMS_HAS_CPLUSPLUS=no]) |
---|
[91333c2] | 69 | |
---|
[971cd22] | 70 | AC_ARG_ENABLE(gcc28, \ |
---|
[e412bae] | 71 | [ --enable-gcc28 enable use of gcc 2.8.x features], \ |
---|
[69df7da] | 72 | [case "${enableval}" in |
---|
| 73 | yes) RTEMS_USE_GCC272=no ;; |
---|
| 74 | no) RTEMS_USE_GCC272=yes ;; |
---|
| 75 | *) AC_MSG_ERROR(bad value ${enableval} for gcc-28 option) ;; |
---|
[fcb114c1] | 76 | esac],[RTEMS_USE_GCC272=no]) |
---|
[e412bae] | 77 | |
---|
| 78 | AC_ARG_ENABLE(libcdir, \ |
---|
| 79 | [ --enable-libcdir=directory set the directory for the C library], \ |
---|
| 80 | [ RTEMS_LIBC_DIR="${enableval}" ; \ |
---|
| 81 | test -d ${enableval} || AC_MSG_ERROR("$enableval is not a directory" ) ] ) |
---|
| 82 | |
---|
[550ca7d5] | 83 | AC_ARG_ENABLE(bare-cpu-cflags, |
---|
| 84 | [ --enable-bare-cpu-cflags \ |
---|
| 85 | specify a particular cpu cflag (bare bsp specific)], |
---|
[bd5e4f3b] | 86 | [case "${enableval}" in |
---|
[550ca7d5] | 87 | no) BARE_CPU_CFLAGS="" ;; |
---|
| 88 | *) BARE_CPU_CFLAGS="${enableval}" ;; |
---|
[bd5e4f3b] | 89 | esac], |
---|
[550ca7d5] | 90 | [BARE_CPU_CFLAGS=""]) |
---|
[bd5e4f3b] | 91 | |
---|
[550ca7d5] | 92 | AC_ARG_ENABLE(bare-cpu-model, |
---|
| 93 | [ --enable-bare-cpu-model \ |
---|
| 94 | specify a particular cpu model (bare bsp specific)], |
---|
[bd5e4f3b] | 95 | [case "${enableval}" in |
---|
[550ca7d5] | 96 | no) BARE_CPU_MODEL="" ;; |
---|
| 97 | *) BARE_CPU_MODEL="${enableval}" ;; |
---|
[bd5e4f3b] | 98 | esac], |
---|
[550ca7d5] | 99 | [BARE_CPU_MODEL=""]) |
---|
[bd5e4f3b] | 100 | |
---|
[254b4450] | 101 | RTEMS_PREFIX=${target_cpu}-${target_vendor} |
---|
| 102 | |
---|
[a50148a] | 103 | dnl BEGIN configure.host.in |
---|
| 104 | |
---|
| 105 | AC_PATH_PROG(CAT,cat) |
---|
| 106 | AC_PATH_PROG(RM,rm) |
---|
| 107 | AC_PATH_PROG(CP,cp) |
---|
| 108 | AC_PATH_PROG(MV,mv) |
---|
| 109 | AC_PATH_PROG(LN,ln) |
---|
[37717818] | 110 | AC_PROG_LN_S |
---|
[a50148a] | 111 | AC_PATH_PROG(CHMOD,chmod) |
---|
| 112 | AC_PATH_PROG(SORT,sort) |
---|
[f95d2b53] | 113 | AC_PROG_INSTALL |
---|
[11cfb6f7] | 114 | AC_PATH_PROG(PERL,perl) |
---|
| 115 | if test -z "$PERL" ; then |
---|
| 116 | AC_MSG_WARN( |
---|
| 117 | [***] |
---|
| 118 | [ perl was not found] |
---|
| 119 | [ Note: Some tools will not be built.]) |
---|
| 120 | fi |
---|
[a50148a] | 121 | |
---|
| 122 | dnl check mkdir behaviour, try to get mkdir -p -m 0755 |
---|
| 123 | RTEMS_PATH_MKDIR |
---|
| 124 | RTEMS_PROG_MKDIR_M |
---|
| 125 | RTEMS_PROG_MKDIR_P |
---|
| 126 | test "$rtems_cv_prog_MKDIR_P" = "yes" && MKDIR="$MKDIR -p" |
---|
[f205fe6d] | 127 | #test "$rtems_cv_prog_MKDIR_M" = "yes" && MKDIR="$MKDIR -m 0755" |
---|
[a50148a] | 128 | |
---|
| 129 | AC_PATH_PROG(TOUCH,touch) |
---|
| 130 | AC_PATH_PROG(CMP,cmp) |
---|
| 131 | |
---|
| 132 | AC_PATH_PROG(SED,sed) |
---|
| 133 | AC_PATH_PROGS(M4,gm4 m4) |
---|
| 134 | |
---|
| 135 | dnl NOTE: prefer bash over ksh over sh |
---|
| 136 | AC_PATH_PROGS(KSH,bash ksh sh) |
---|
| 137 | |
---|
| 138 | if test -z "$KSH"; then |
---|
| 139 | dnl NOTE: This cannot happen -- /bin/sh must always exist |
---|
| 140 | AC_MSG_ERROR( |
---|
| 141 | [***] |
---|
| 142 | [ Cannot determine a usable shell bash/ksh/sh] |
---|
| 143 | [ Please contact your system administrator] ); |
---|
| 144 | fi |
---|
| 145 | |
---|
[1670eede] | 146 | dnl BEGIN configure.target.in |
---|
| 147 | |
---|
[37717818] | 148 | dnl echo "TARGET" |
---|
| 149 | dnl echo " cpu --> $target_cpu" |
---|
| 150 | dnl echo " os --> $target_os" |
---|
| 151 | dnl echo " vendor --> $target_vendor" |
---|
[1670eede] | 152 | |
---|
| 153 | dnl canonicalize target name |
---|
| 154 | dnl NOTE: Most rtems targets do not fullfil autoconf |
---|
| 155 | dnl targets naming conventions "processor-vendor-os" |
---|
| 156 | dnl Therefore autoconf's AC_CANONICAL_TARGET will fail for them |
---|
| 157 | dnl and we have to fix it for rtems ourselves |
---|
[37717818] | 158 | dnl |
---|
| 159 | dnl The original plan was to do CPU-BSP-rtems or CPU-rtems to |
---|
| 160 | dnl imply all BSPs. Eventually we would like to build a collection |
---|
| 161 | dnl of CPU model specific RTEMS libraries which in conjunction with |
---|
| 162 | dnl a BSP library would be used to link an application. |
---|
[872cc62] | 163 | |
---|
[744df795] | 164 | RTEMS_HOST=$host_os |
---|
| 165 | |
---|
[254b4450] | 166 | case "${target}" in |
---|
| 167 | # hpux unix port should go here |
---|
| 168 | i[[3456]]86-go32-rtems*) |
---|
[1670eede] | 169 | target_cpu=i386 |
---|
[254b4450] | 170 | rtems_bsp="go32 go32_p5" |
---|
[37717818] | 171 | skip_startfiles="yes" |
---|
[254b4450] | 172 | RTEMS_HAS_POSIX_API=no |
---|
| 173 | ;; |
---|
| 174 | i[[3456]]86-pc-linux*) # unix "simulator" port |
---|
[1670eede] | 175 | target_cpu=unix |
---|
[744df795] | 176 | RTEMS_HOST=Linux |
---|
[2758c9f2] | 177 | # override these settings |
---|
| 178 | RTEMS_HAS_POSIX_API=no |
---|
[254b4450] | 179 | ;; |
---|
[98100d2] | 180 | i[[3456]]86-*freebsd2*) # unix "simulator" port |
---|
[9a6994b4] | 181 | target_cpu=unix |
---|
| 182 | RTEMS_HOST=FreeBSD |
---|
| 183 | # override these settings |
---|
| 184 | RTEMS_HAS_POSIX_API=no |
---|
| 185 | ;; |
---|
[2bb990f] | 186 | no_cpu-*rtems*) |
---|
[1670eede] | 187 | target_cpu=no_cpu |
---|
[475fb331] | 188 | RTEMS_HAS_POSIX_API=no |
---|
[254b4450] | 189 | ;; |
---|
[d7c9cbe4] | 190 | ppc*-*rtems*) |
---|
| 191 | target_cpu=powerpc |
---|
[bd5e4f3b] | 192 | ;; |
---|
[254b4450] | 193 | sparc-sun-solaris*) # unix "simulator" port |
---|
[1670eede] | 194 | target_cpu=unix |
---|
[744df795] | 195 | RTEMS_HOST=Solaris |
---|
[2758c9f2] | 196 | # override these settings |
---|
| 197 | RTEMS_HAS_POSIX_API=no |
---|
[254b4450] | 198 | ;; |
---|
[1670eede] | 199 | *) |
---|
| 200 | RTEMS_CANONICAL_TARGET_CPU |
---|
[254b4450] | 201 | ;; |
---|
| 202 | esac |
---|
| 203 | |
---|
[b9ca4ba] | 204 | # Override the set of BSPs to be built. |
---|
| 205 | AC_ARG_ENABLE(rtemsbsp, \ |
---|
| 206 | [ --enable-rtemsbsp=bsp1 bsp2 .. BSPs to include in build], \ |
---|
| 207 | rtems_bsp=$enableval \ |
---|
| 208 | ) |
---|
| 209 | |
---|
[37717818] | 210 | # Is this a supported CPU? |
---|
[1670eede] | 211 | AC_MSG_CHECKING([if cpu $target_cpu is supported]) |
---|
| 212 | if test -d "$srcdir/c/src/exec/score/cpu/$target_cpu"; then |
---|
| 213 | AC_MSG_RESULT(yes) |
---|
| 214 | else |
---|
| 215 | AC_MSG_ERROR(no) |
---|
| 216 | fi |
---|
| 217 | |
---|
[2efdd08] | 218 | RTEMS_TOOL_PREFIX |
---|
[3771cc6e] | 219 | |
---|
| 220 | dnl check target cc |
---|
| 221 | RTEMS_PROG_CC |
---|
[0b76723] | 222 | dnl check if the compiler supports --specs |
---|
| 223 | RTEMS_GCC_SPECS |
---|
| 224 | dnl check if the target compiler may use --pipe |
---|
| 225 | RTEMS_GCC_PIPE |
---|
[3771cc6e] | 226 | |
---|
| 227 | dnl check if the compiler supports --specs if gcc28 is requested |
---|
| 228 | if test "$RTEMS_USE_GCC272" != "yes" ; then |
---|
| 229 | if test "$rtems_cv_gcc_specs" = "no"; then |
---|
| 230 | AC_MSG_WARN([*** disabling --enable-gcc28]) |
---|
| 231 | RTEMS_USE_GCC272=yes |
---|
| 232 | fi |
---|
| 233 | fi |
---|
[2efdd08] | 234 | test "$rtems_cv_gcc_pipe" = "yes" && CC_FOR_TARGET="$CC_FOR_TARGET --pipe" |
---|
[3771cc6e] | 235 | |
---|
| 236 | dnl check for g++ |
---|
| 237 | if test "$RTEMS_HAS_CPLUSPLUS" = "yes"; then |
---|
| 238 | RTEMS_PROG_CXX |
---|
[0b76723] | 239 | if test "$rtems_cv_prog_cc_cross" != "$rtems_cv_prog_cxx_cross"; then |
---|
| 240 | AC_MSG_ERROR([***] |
---|
| 241 | [Inconsistency in compiler configuration:] |
---|
| 242 | [Target C compiler and Target C++ compiler] |
---|
[2e26bbd] | 243 | [must both either be cross compilers or native compilers] |
---|
[2efdd08] | 244 | [Hint: If building a posix bsp: LD_LIBRARY_PATH?] ) |
---|
[0b76723] | 245 | fi |
---|
[3771cc6e] | 246 | else |
---|
| 247 | CXX_FOR_TARGET="no" |
---|
| 248 | fi |
---|
| 249 | |
---|
| 250 | RTEMS_CANONICALIZE_TOOLS |
---|
| 251 | |
---|
[2c3840b] | 252 | dnl if this is an i386, does gas have good code16 support? |
---|
| 253 | RTEMS_I386_GAS_CODE16 |
---|
| 254 | |
---|
[3771cc6e] | 255 | dnl check host cc |
---|
| 256 | AC_PROG_CC |
---|
| 257 | |
---|
[98100d2] | 258 | RTEMS_CYGWIN32 |
---|
| 259 | RTEMS_EXEEXT |
---|
| 260 | |
---|
| 261 | dnl FIXME: HACK for egcs/cygwin mixing '\\' and '/' in gcc -print-* |
---|
| 262 | case $host_os in |
---|
| 263 | *cygwin32*) GCCSED="| sed 's%\\\\%/%g'" ;; |
---|
| 264 | *) ;; |
---|
| 265 | esac |
---|
| 266 | AC_SUBST(GCCSED) |
---|
| 267 | |
---|
[cce81a7] | 268 | dnl FIXME: This is a kludge |
---|
[946b3cb] | 269 | dnl Set flags to settings all gcc variants are assumed to accept. |
---|
| 270 | if test "$ac_cv_prog_gcc" = "yes"; then |
---|
[cce81a7] | 271 | dnl Add -Wall if using gcc as host compiler |
---|
[946b3cb] | 272 | CC_CFLAGS_DEFAULT=-Wall |
---|
| 273 | dnl Add -pg to profile flags, unless specified in the environment |
---|
| 274 | CC_CFLAGS_PROFILE_V=${CC_CFLAGS_PROFILE_V-"-pg"} |
---|
| 275 | dnl propagate cflags to ldflags, unless specified in the environment |
---|
| 276 | CC_LDFLAGS_PROFILE_V=${CC_LDFLAGS_PROFILE_V-$CC_CFLAGS_PROFILE_V} |
---|
| 277 | fi |
---|
| 278 | |
---|
[cce81a7] | 279 | dnl Add -g if the host compiler accepts -g, assume -g means debugging |
---|
[946b3cb] | 280 | test "$ac_cv_prog_cc_g" = "yes" && CC_CFLAGS_DEBUG_V=${CC_CFLAGS_DEBUG_V-"-g"} |
---|
[cce81a7] | 281 | |
---|
[3771cc6e] | 282 | dnl check for host library functions |
---|
| 283 | dnl NOTE: must be called after AC_PROG_CC |
---|
| 284 | AC_CHECK_FUNCS(strerror) |
---|
| 285 | |
---|
[613ab62] | 286 | dnl check for SysV IPC used by simulators |
---|
| 287 | if test "$target_cpu" = "unix" ; then |
---|
| 288 | RTEMS_SYSV_SEM |
---|
| 289 | if test "$rtems_cv_sysv_sem" != "yes" ; then |
---|
| 290 | AC_MSG_ERROR([System V semaphores don't work, required by simulator]) |
---|
| 291 | fi |
---|
| 292 | RTEMS_SYSV_SHM |
---|
| 293 | if test "$rtems_cv_sysv_shm" != "yes" ; then |
---|
| 294 | AC_MSG_ERROR([System V shared memory doesn't work, required by simulator]) |
---|
| 295 | fi |
---|
| 296 | RTEMS_SYSV_MSG |
---|
| 297 | if test "$rtems_cv_sysv_msg" != "yes" ; then |
---|
| 298 | AC_MSG_ERROR([System V messages don't work, required by simulator]) |
---|
| 299 | fi |
---|
| 300 | fi |
---|
| 301 | |
---|
[37717818] | 302 | # find all the Executive Makefiles |
---|
[744df795] | 303 | RTEMS_CHECK_MAKEFILE(c/src/exec/score/tools/$target_cpu) |
---|
[37717818] | 304 | RTEMS_CHECK_MAKEFILE(c/src/exec/rtems) |
---|
| 305 | RTEMS_CHECK_MAKEFILE(c/src/exec/sapi) |
---|
[7908ba5b] | 306 | RTEMS_CHECK_MAKEFILE(c/src/exec/score/cpu/$target_cpu) |
---|
[b9ca4ba] | 307 | |
---|
[ba1a2af9] | 308 | if test "$RTEMS_HAS_POSIX_API" = "yes"; then |
---|
[b9ca4ba] | 309 | RTEMS_CHECK_MAKEFILE(c/src/exec/posix) |
---|
[ba1a2af9] | 310 | makefiles="$makefiles c/src/exec/wrapup/posix/Makefile" |
---|
[b9ca4ba] | 311 | fi |
---|
[1670eede] | 312 | |
---|
[37717818] | 313 | # find all the Makefiles for the BSPs |
---|
[1670eede] | 314 | if test -d "$srcdir/c/src/lib/libbsp/$target_cpu"; then |
---|
[37717818] | 315 | makefiles="$makefiles c/src/lib/libbsp/$target_cpu/Makefile" |
---|
| 316 | |
---|
| 317 | if test -z "$rtems_bsp"; then |
---|
| 318 | AC_MSG_CHECKING([for bsps]) |
---|
| 319 | files=`ls $srcdir/c/src/lib/libbsp/$target_cpu` |
---|
| 320 | for file in $files; do |
---|
| 321 | case $file in |
---|
| 322 | shared*);; |
---|
| 323 | Makefile*);; |
---|
| 324 | READ*);; |
---|
| 325 | CVS*);; |
---|
[674c900] | 326 | pxfl*);; |
---|
| 327 | go32*);; # so the i386 port can pick up the other Makefiles |
---|
| 328 | # Now account for BSPs with build variants |
---|
| 329 | gen68360) rtems_bsp="$rtems_bsp gen68360 gen68360_040";; |
---|
| 330 | p4000) rtems_bsp="$rtems_bsp p4600 p4650";; |
---|
| 331 | mvme162) rtems_bsp="$rtems_bsp mvme162 mvme162lx";; |
---|
[37717818] | 332 | *) rtems_bsp="$rtems_bsp $file";; |
---|
| 333 | esac; |
---|
| 334 | done |
---|
[674c900] | 335 | |
---|
[bd5e4f3b] | 336 | makefiles="$makefiles c/src/lib/libbsp/bare/Makefile" |
---|
| 337 | |
---|
[300c8a76] | 338 | AC_MSG_RESULT([$rtems_bsp done]) |
---|
[37717818] | 339 | fi |
---|
| 340 | |
---|
| 341 | # collect makefiles for each bsp |
---|
| 342 | for i in $rtems_bsp; do |
---|
[b9ca4ba] | 343 | # make sure there is a make/custom file for the bsp |
---|
[6d6f1b34] | 344 | if test ! -r "$srcdir/make/custom/${i}.cfg"; then |
---|
[b9ca4ba] | 345 | AC_MSG_ERROR([no make/custom/${i}.cfg file for BSP $i]) |
---|
| 346 | fi |
---|
[674c900] | 347 | |
---|
[b9ca4ba] | 348 | # account for "aliased" bsps which share source code |
---|
| 349 | case $i in |
---|
| 350 | mvme162lx) bspdir=mvme162 ;; # mvme162 board variant |
---|
| 351 | gen68360_040) bspdir=gen68360 ;; # 68360 in companion mode |
---|
| 352 | go32_p5) bspdir=go32 ;; # go32 on Pentium class CPU |
---|
| 353 | p4600) bspdir=p4000 ;; # p4000 board with IDT 4600 |
---|
| 354 | p4650) bspdir=p4000 ;; # p4000 board with IDT 4650 |
---|
| 355 | *) bspdir=$i;; |
---|
| 356 | esac |
---|
| 357 | |
---|
| 358 | # Is there code where there should be for this BSP? |
---|
[bd5e4f3b] | 359 | # The bare bsp is a special case as it is not under the target_cpu path |
---|
| 360 | case $i in |
---|
[579fc6a3] | 361 | bare) |
---|
| 362 | bspcpudir= |
---|
| 363 | if test "X${BARE_CPU_CFLAGS}" = "X" ; then |
---|
[959d752] | 364 | AC_MSG_ERROR([--enable-bare-cpu-cflags not specified for bare bsp]) |
---|
[579fc6a3] | 365 | fi |
---|
| 366 | if test "X${BARE_CPU_MODEL}" = "X" ; then |
---|
| 367 | AC_MSG_ERROR([--enable-bare-cpu-model not specified for bare bsp]) |
---|
| 368 | fi |
---|
| 369 | ;; |
---|
| 370 | *) |
---|
| 371 | bspcpudir=$target_cpu/ |
---|
| 372 | ;; |
---|
[bd5e4f3b] | 373 | esac |
---|
[1388d19] | 374 | |
---|
[a5400c0] | 375 | if test -d "$srcdir/c/src/lib/libbsp/$bspcpudir$bspdir"; then |
---|
[1388d19] | 376 | RTEMS_BSP_LIST="$RTEMS_BSP_LIST $i" |
---|
| 377 | # make sure the Makefiles in a bsp directory are only done once |
---|
| 378 | echo $bspdirs | grep $bspdir >/dev/null 2>&1 |
---|
| 379 | if test $? -ne 0 ; then |
---|
| 380 | bspdirs="$bspdirs $bspdir" |
---|
[a5400c0] | 381 | RTEMS_CHECK_MAKEFILE(c/src/lib/libbsp/$bspcpudir$bspdir) |
---|
[67a2288] | 382 | RTEMS_CHECK_MAKEFILE(c/src/lib/libbsp/${bspcpudir}shared) |
---|
[1388d19] | 383 | fi |
---|
| 384 | else |
---|
| 385 | AC_MSG_ERROR([unable to find libbsp directory ($bspdir) for $i]) |
---|
| 386 | fi |
---|
[1670eede] | 387 | done |
---|
| 388 | fi |
---|
| 389 | |
---|
[37717818] | 390 | # find all the CPU dependent library Makefiles |
---|
[1670eede] | 391 | RTEMS_CHECK_MAKEFILE(c/src/lib/libcpu/$target_cpu) |
---|
| 392 | |
---|
[37717818] | 393 | dnl Workaround for go32 |
---|
| 394 | if test "$skip_startfiles" != "yes"; then |
---|
| 395 | RTEMS_CHECK_MAKEFILE(c/src/lib/start/$target_cpu) |
---|
| 396 | fi |
---|
[1670eede] | 397 | |
---|
| 398 | dnl END configure.target.in |
---|
| 399 | |
---|
| 400 | |
---|
[4a7c0451] | 401 | PROJECT_ROOT=`pwd;` |
---|
[254b4450] | 402 | |
---|
[566aea7d] | 403 | # If RTEMS macros are enabled, then use them. Otherwise, use inlines. |
---|
| 404 | if test "$RTEMS_USE_MACROS" = "yes"; then |
---|
| 405 | inline_dir=macros |
---|
| 406 | if test "$RTEMS_HAS_POSIX_API" = "yes"; then |
---|
| 407 | # The problem is that there is currently no code in posix/macros :) |
---|
| 408 | AC_MSG_ERROR(Macros are not implemented for the POSIX API) |
---|
| 409 | fi |
---|
| 410 | else |
---|
| 411 | inline_dir=inline |
---|
| 412 | fi |
---|
| 413 | |
---|
[0280cb6] | 414 | # If the TCP/IP stack is enabled, then find all TCP/IP Makefiles |
---|
| 415 | AC_MSG_CHECKING([if networking is enabled? ]) |
---|
| 416 | AC_MSG_RESULT($RTEMS_HAS_NETWORKING) |
---|
| 417 | if test "$RTEMS_HAS_NETWORKING" = "yes"; then |
---|
| 418 | RTEMS_CHECK_MAKEFILE(c/src/lib/libnetworking) |
---|
[4721cf1] | 419 | RTEMS_CHECK_MAKEFILE(c/src/lib/librpc) |
---|
| 420 | if test "$RTEMS_HAS_RDBG" = "yes"; then |
---|
| 421 | RTEMS_CHECK_MAKEFILE(c/src/lib/librdbg) |
---|
| 422 | fi |
---|
[0280cb6] | 423 | fi |
---|
| 424 | |
---|
[80a16ec4] | 425 | # If the C++ support is enabled, then include the Makefiles |
---|
| 426 | if test "$RTEMS_HAS_CPLUSPLUS" = "yes"; then |
---|
| 427 | makefiles="$makefiles c/src/lib/librtems++/Makefile" |
---|
| 428 | fi |
---|
[1f0f3e35] | 429 | |
---|
[37717818] | 430 | # If the tests are enabled, then find all the test suite Makefiles |
---|
[70dda0ea] | 431 | AC_MSG_CHECKING([if the test suites are enabled? ]) |
---|
[16b5264d] | 432 | tests_enabled=no |
---|
[254b4450] | 433 | AC_ARG_ENABLE(tests, \ |
---|
[e1b77701] | 434 | [ --enable-tests enable tests (default:disabled)], \ |
---|
[b9ca4ba] | 435 | [case "${enableval}" in |
---|
[16b5264d] | 436 | yes) AC_MSG_RESULT(yes) ; tests_enabled=yes ;; |
---|
[b9ca4ba] | 437 | no) AC_MSG_RESULT(no) ; tests_enabled=no ;; |
---|
| 438 | *) AC_MSG_ERROR(bad value ${enableval} for tests option) ;; |
---|
| 439 | esac], |
---|
[e1b77701] | 440 | AC_MSG_RESULT(no) |
---|
[37717818] | 441 | ) |
---|
| 442 | |
---|
[41f61bc] | 443 | RTEMS_CHECK_MAKEFILE(c/src/tests/tools/$target_cpu) |
---|
| 444 | |
---|
[b9ca4ba] | 445 | if test "$tests_enabled" = "yes"; then |
---|
| 446 | RTEMS_CHECK_MAKEFILE(c/src/tests/libtests) |
---|
| 447 | RTEMS_CHECK_MAKEFILE(c/src/tests/sptests) |
---|
| 448 | RTEMS_CHECK_MAKEFILE(c/src/tests/tmtests) |
---|
[97e2729d] | 449 | if test "$RTEMS_HAS_MULTIPROCESSING" = "yes"; then |
---|
| 450 | RTEMS_CHECK_MAKEFILE(c/src/tests/mptests) |
---|
| 451 | fi |
---|
[9829978] | 452 | if test "$RTEMS_HAS_POSIX_API" = "yes"; then |
---|
[b9ca4ba] | 453 | RTEMS_CHECK_MAKEFILE(c/src/tests/psxtests) |
---|
| 454 | fi |
---|
| 455 | fi |
---|
| 456 | |
---|
[37717818] | 457 | # If the HWAPI is enabled, the find the HWAPI Makefiles |
---|
[70dda0ea] | 458 | AC_MSG_CHECKING([if the HWAPI is enabled? ]) |
---|
[d4cf164] | 459 | AC_ARG_ENABLE(hwapi, \ |
---|
[b9ca4ba] | 460 | [ --enable-hwapi enable hardware API library], \ |
---|
| 461 | [case "${enableval}" in |
---|
| 462 | yes) AC_MSG_RESULT(yes) |
---|
[80a16ec4] | 463 | if test -f ${srcdir}/c/src/lib/libhwapi/Makefile.in ; then |
---|
| 464 | makefiles="$makefiles c/src/lib/libhwapi/Makefile" |
---|
| 465 | RTEMS_CHECK_MAKEFILE(c/src/lib/libhwapi/analog) |
---|
| 466 | RTEMS_CHECK_MAKEFILE(c/src/lib/libhwapi/discrete) |
---|
| 467 | RTEMS_CHECK_MAKEFILE(c/src/lib/libhwapi/drivers) |
---|
[6d6f1b34] | 468 | RTEMS_CHECK_MAKEFILE(c/src/lib/libhwapi/non_volatile_memory) |
---|
[80a16ec4] | 469 | RTEMS_CHECK_MAKEFILE(c/src/lib/libhwapi/serial) |
---|
| 470 | RTEMS_CHECK_MAKEFILE(c/src/lib/libhwapi/support) |
---|
| 471 | RTEMS_CHECK_MAKEFILE(c/src/lib/libhwapi/wrapup) |
---|
| 472 | else |
---|
| 473 | AC_MSG_ERROR(No source code found for the HWAPI) |
---|
| 474 | fi |
---|
| 475 | ;; |
---|
[b9ca4ba] | 476 | no) AC_MSG_RESULT(no) ;; |
---|
| 477 | *) AC_MSG_ERROR(bad value ${enableval} for hwapi option) ;; |
---|
| 478 | esac], |
---|
| 479 | AC_MSG_RESULT(no) |
---|
[37717818] | 480 | ) |
---|
[254b4450] | 481 | |
---|
[2c3840b] | 482 | AC_SUBST(RTEMS_GAS_CODE16) |
---|
[0b76723] | 483 | AC_SUBST(rtems_cv_prog_cc_cross) |
---|
[87cec48] | 484 | AC_SUBST(RTEMS_BSP_LIST) |
---|
[254b4450] | 485 | AC_SUBST(RTEMS_HOST) |
---|
| 486 | AC_SUBST(RTEMS_LIBC_DIR) |
---|
[91333c2] | 487 | AC_SUBST(RTEMS_USE_OWN_PDIR) |
---|
[254b4450] | 488 | AC_SUBST(RTEMS_HAS_POSIX_API) |
---|
[0280cb6] | 489 | AC_SUBST(RTEMS_HAS_NETWORKING) |
---|
[4721cf1] | 490 | AC_SUBST(RTEMS_HAS_RDBG) |
---|
[254b4450] | 491 | AC_SUBST(RTEMS_USE_MACROS) |
---|
[91333c2] | 492 | AC_SUBST(RTEMS_HAS_CPLUSPLUS) |
---|
[e412bae] | 493 | AC_SUBST(RTEMS_USE_GCC272) |
---|
| 494 | AC_SUBST(RTEMS_LIBC_DIR) |
---|
[550ca7d5] | 495 | AC_SUBST(BARE_CPU_CFLAGS) |
---|
| 496 | AC_SUBST(BARE_CPU_MODEL) |
---|
[254b4450] | 497 | AC_SUBST(PROJECT_ROOT) |
---|
| 498 | AC_SUBST(program_prefix) |
---|
[cce81a7] | 499 | AC_SUBST(CC_CFLAGS_DEFAULT) |
---|
| 500 | AC_SUBST(CC_CFLAGS_DEBUG_V) |
---|
[946b3cb] | 501 | AC_SUBST(CC_CFLAGS_PROFILE_V) |
---|
| 502 | AC_SUBST(CC_LDFLAGS_PROFILE_V) |
---|
[254b4450] | 503 | |
---|
[37717818] | 504 | # pick up all the Makefiles in required parts of the tree |
---|
| 505 | RTEMS_CHECK_MAKEFILE(c/build-tools) |
---|
[6d6f1b34] | 506 | RTEMS_CHECK_MAKEFILE(make) |
---|
[692b9f7] | 507 | RTEMS_CHECK_MAKEFILE(c/src/lib/libchip) |
---|
[37717818] | 508 | RTEMS_CHECK_MAKEFILE(c/src/lib/libmisc) |
---|
| 509 | RTEMS_CHECK_MAKEFILE(c/src/tests/samples) |
---|
[1670eede] | 510 | |
---|
[243ce5d] | 511 | AC_CONFIG_HEADER(c/build-tools/src/config.h) |
---|
| 512 | |
---|
[37717818] | 513 | # try not to explicitly list a Makefile here |
---|
[1670eede] | 514 | AC_OUTPUT( |
---|
| 515 | Makefile |
---|
[3771cc6e] | 516 | make/host.cfg |
---|
| 517 | make/target.cfg |
---|
| 518 | make/Templates/Makefile.inc |
---|
[cce81a7] | 519 | make/compilers/gcc.cfg |
---|
[a50148a] | 520 | c/Makefile |
---|
| 521 | c/src/Makefile |
---|
| 522 | c/src/exec/Makefile |
---|
| 523 | c/src/exec/score/Makefile |
---|
| 524 | c/src/exec/score/cpu/Makefile |
---|
[283d7285] | 525 | c/src/exec/score/include/Makefile |
---|
| 526 | c/src/exec/score/include/rtems/Makefile |
---|
| 527 | c/src/exec/score/include/rtems/wrap/Makefile |
---|
| 528 | c/src/exec/score/include/rtems/score/Makefile |
---|
[566aea7d] | 529 | c/src/exec/score/${inline_dir}/Makefile |
---|
[283d7285] | 530 | c/src/exec/score/${inline_dir}/rtems/Makefile |
---|
| 531 | c/src/exec/score/${inline_dir}/rtems/score/Makefile |
---|
[a50148a] | 532 | c/src/exec/score/src/Makefile |
---|
| 533 | c/src/exec/score/tools/Makefile |
---|
| 534 | c/src/exec/score/tools/generic/Makefile |
---|
[b9ca4ba] | 535 | c/src/exec/wrapup/Makefile |
---|
| 536 | c/src/exec/wrapup/rtems/Makefile |
---|
[a50148a] | 537 | c/src/lib/Makefile |
---|
| 538 | c/src/lib/include/Makefile |
---|
| 539 | c/src/lib/libbsp/Makefile |
---|
| 540 | c/src/lib/libbsp/shmdr/Makefile |
---|
| 541 | c/src/lib/libc/Makefile |
---|
| 542 | c/src/lib/libcpu/Makefile |
---|
| 543 | c/src/lib/start/Makefile |
---|
| 544 | c/src/lib/wrapup/Makefile |
---|
| 545 | c/src/tests/Makefile |
---|
| 546 | c/src/tests/support/Makefile |
---|
| 547 | c/src/tests/support/include/Makefile |
---|
| 548 | c/src/tests/support/stubdr/Makefile |
---|
| 549 | c/src/tests/support/wrapup/Makefile |
---|
| 550 | c/src/tests/tools/Makefile |
---|
| 551 | c/src/tests/tools/generic/Makefile |
---|
| 552 | $makefiles |
---|
[1670eede] | 553 | c/update-tools/Makefile) |
---|
[254b4450] | 554 | |
---|
| 555 | echo |
---|
| 556 | echo target architecture: $target_cpu. |
---|
| 557 | echo available BSPs: $rtems_bsp. |
---|
[87cec48] | 558 | echo \'make all\' will build the following BSPs: $RTEMS_BSP_LIST. |
---|
| 559 | echo other BSPs can be built with \'make RTEMS_BSP=\"bsp1 bsp2 ...\"\' |
---|
[254b4450] | 560 | echo |
---|