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