1 | dnl aclocal.m4 generated automatically by aclocal 1.4 |
---|
2 | |
---|
3 | dnl Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc. |
---|
4 | dnl This file is free software; the Free Software Foundation |
---|
5 | dnl gives unlimited permission to copy and/or distribute it, |
---|
6 | dnl with or without modifications, as long as this notice is preserved. |
---|
7 | |
---|
8 | dnl This program is distributed in the hope that it will be useful, |
---|
9 | dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without |
---|
10 | dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A |
---|
11 | dnl PARTICULAR PURPOSE. |
---|
12 | |
---|
13 | dnl $Id$ |
---|
14 | |
---|
15 | dnl |
---|
16 | dnl RTEMS_TOP($1) |
---|
17 | dnl |
---|
18 | dnl $1 .. relative path from this configure.in to the toplevel configure.in |
---|
19 | dnl |
---|
20 | AC_DEFUN(RTEMS_TOP, |
---|
21 | [dnl |
---|
22 | AC_ARG_WITH(target-subdir, |
---|
23 | [ --with-target-subdir=DIR], |
---|
24 | TARGET_SUBDIR="$withval", |
---|
25 | TARGET_SUBDIR=".") |
---|
26 | |
---|
27 | RTEMS_TOPdir="$1"; |
---|
28 | AC_SUBST(RTEMS_TOPdir) |
---|
29 | |
---|
30 | dnl Determine RTEMS Version string from the VERSION file |
---|
31 | dnl Hopefully, Joel never changes its format ;- |
---|
32 | AC_MSG_CHECKING([for RTEMS Version]) |
---|
33 | if test -r "${srcdir}/${RTEMS_TOPdir}/VERSION"; then |
---|
34 | changequote(,)dnl |
---|
35 | RTEMS_VERSION=`grep Version ${srcdir}/${RTEMS_TOPdir}/VERSION | \ |
---|
36 | sed -e 's%RTEMS[ ]*Version[ ]*\(.*\)[ ]*%\1%g'` |
---|
37 | changequote([,])dnl |
---|
38 | else |
---|
39 | AC_MSG_ERROR(Unable to find ${RTEMS_TOPdir}/VERSION) |
---|
40 | fi |
---|
41 | if test -z "$RTEMS_VERSION"; then |
---|
42 | AC_MSG_ERROR(Unable to determine version) |
---|
43 | fi |
---|
44 | AC_MSG_RESULT($RTEMS_VERSION) |
---|
45 | ])dnl |
---|
46 | |
---|
47 | dnl |
---|
48 | dnl $Id$ |
---|
49 | dnl |
---|
50 | |
---|
51 | dnl canonicalize target cpu |
---|
52 | dnl NOTE: Most rtems targets do not fullfil autoconf's |
---|
53 | dnl target naming conventions "processor-vendor-os" |
---|
54 | dnl Therefore autoconf's AC_CANONICAL_TARGET will fail for them |
---|
55 | dnl and we have to fix it for rtems ourselves |
---|
56 | |
---|
57 | AC_DEFUN(RTEMS_CANONICAL_TARGET_CPU, |
---|
58 | [ |
---|
59 | AC_CANONICAL_SYSTEM |
---|
60 | AC_MSG_CHECKING(rtems target cpu) |
---|
61 | changequote(,)dnl |
---|
62 | case "${target}" in |
---|
63 | # hpux unix port should go here |
---|
64 | i[3456]86-go32-rtems*) |
---|
65 | RTEMS_CPU=i386 |
---|
66 | ;; |
---|
67 | i[3456]86-pc-linux*) # unix "simulator" port |
---|
68 | RTEMS_CPU=unix |
---|
69 | ;; |
---|
70 | i[3456]86-*freebsd2*) # unix "simulator" port |
---|
71 | RTEMS_CPU=unix |
---|
72 | ;; |
---|
73 | no_cpu-*rtems*) |
---|
74 | RTEMS_CPU=no_cpu |
---|
75 | ;; |
---|
76 | sparc-sun-solaris*) # unix "simulator" port |
---|
77 | RTEMS_CPU=unix |
---|
78 | ;; |
---|
79 | *) |
---|
80 | RTEMS_CPU=`echo $target | sed 's%^\([^-]*\)-\(.*\)$%\1%'` |
---|
81 | ;; |
---|
82 | esac |
---|
83 | changequote([,])dnl |
---|
84 | AC_SUBST(RTEMS_CPU) |
---|
85 | AC_MSG_RESULT($RTEMS_CPU) |
---|
86 | ]) |
---|
87 | |
---|
88 | # Add --enable-maintainer-mode option to configure. |
---|
89 | # From Jim Meyering |
---|
90 | |
---|
91 | # serial 1 |
---|
92 | |
---|
93 | AC_DEFUN(AM_MAINTAINER_MODE, |
---|
94 | [AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) |
---|
95 | dnl maintainer-mode is disabled by default |
---|
96 | AC_ARG_ENABLE(maintainer-mode, |
---|
97 | [ --enable-maintainer-mode enable make rules and dependencies not useful |
---|
98 | (and sometimes confusing) to the casual installer], |
---|
99 | USE_MAINTAINER_MODE=$enableval, |
---|
100 | USE_MAINTAINER_MODE=no) |
---|
101 | AC_MSG_RESULT($USE_MAINTAINER_MODE) |
---|
102 | AM_CONDITIONAL(MAINTAINER_MODE, test $USE_MAINTAINER_MODE = yes) |
---|
103 | MAINT=$MAINTAINER_MODE_TRUE |
---|
104 | AC_SUBST(MAINT)dnl |
---|
105 | ] |
---|
106 | ) |
---|
107 | |
---|
108 | # Define a conditional. |
---|
109 | |
---|
110 | AC_DEFUN(AM_CONDITIONAL, |
---|
111 | [AC_SUBST($1_TRUE) |
---|
112 | AC_SUBST($1_FALSE) |
---|
113 | if $2; then |
---|
114 | $1_TRUE= |
---|
115 | $1_FALSE='#' |
---|
116 | else |
---|
117 | $1_TRUE='#' |
---|
118 | $1_FALSE= |
---|
119 | fi]) |
---|
120 | |
---|
121 | dnl $Id$ |
---|
122 | |
---|
123 | AC_DEFUN(RTEMS_ENABLE_MULTIPROCESSING, |
---|
124 | [ |
---|
125 | AC_ARG_ENABLE(multiprocessing, |
---|
126 | [ --enable-multiprocessing enable multiprocessing interface], |
---|
127 | [case "${enableval}" in |
---|
128 | yes) RTEMS_HAS_MULTIPROCESSING=yes ;; |
---|
129 | no) RTEMS_HAS_MULTIPROCESSING=no ;; |
---|
130 | *) AC_MSG_ERROR(bad value ${enableval} for enable-multiprocessing option) ;; |
---|
131 | esac],[RTEMS_HAS_MULTIPROCESSING=no]) |
---|
132 | AC_SUBST(RTEMS_HAS_MULTIPROCESSING)dnl |
---|
133 | ]) |
---|
134 | |
---|
135 | dnl $Id$ |
---|
136 | |
---|
137 | AC_DEFUN(RTEMS_ENABLE_NETWORKING, |
---|
138 | [ |
---|
139 | AC_ARG_ENABLE(networking, |
---|
140 | [ --enable-networking enable TCP/IP stack], |
---|
141 | [case "${enableval}" in |
---|
142 | yes) RTEMS_HAS_NETWORKING=yes ;; |
---|
143 | no) RTEMS_HAS_NETWORKING=no ;; |
---|
144 | *) AC_MSG_ERROR(bad value ${enableval} for enable-networking option) ;; |
---|
145 | esac],[RTEMS_HAS_NETWORKING=yes]) |
---|
146 | AC_SUBST(RTEMS_HAS_NETWORKING)dnl |
---|
147 | ]) |
---|
148 | |
---|
149 | dnl $Id$ |
---|
150 | |
---|
151 | AC_DEFUN(RTEMS_ENABLE_RDBG, |
---|
152 | [ |
---|
153 | AC_ARG_ENABLE(rdbg, |
---|
154 | [ --enable-rdbg enable remote debugger], |
---|
155 | [case "${enableval}" in |
---|
156 | yes) RTEMS_HAS_RDBG=yes ;; |
---|
157 | no) RTEMS_HAS_RDBG=no ;; |
---|
158 | *) AC_MSG_ERROR(bad value ${enableval} for enable-rdbg option) ;; |
---|
159 | esac],[RTEMS_HAS_RDBG=no]) |
---|
160 | AC_SUBST(RTEMS_HAS_RDBG)dnl |
---|
161 | ]) |
---|
162 | |
---|
163 | dnl $Id$ |
---|
164 | |
---|
165 | AC_DEFUN(RTEMS_ENABLE_CXX, |
---|
166 | [ |
---|
167 | AC_ARG_ENABLE(cxx, |
---|
168 | [ --enable-cxx enable C++ support,] |
---|
169 | [ and build the rtems++ library], |
---|
170 | [case "${enableval}" in |
---|
171 | yes) RTEMS_HAS_CPLUSPLUS=yes ;; |
---|
172 | no) RTEMS_HAS_CPLUSPLUS=no ;; |
---|
173 | *) AC_MSG_ERROR(bad value ${enableval} for enable-cxx option) ;; |
---|
174 | esac], [RTEMS_HAS_CPLUSPLUS=no]) |
---|
175 | ]) |
---|
176 | |
---|
177 | dnl $Id$ |
---|
178 | |
---|
179 | AC_DEFUN(RTEMS_ENABLE_GCC28, |
---|
180 | [ |
---|
181 | AC_ARG_ENABLE(gcc28, |
---|
182 | [ --enable-gcc28 enable use of gcc 2.8.x features], |
---|
183 | [case "${enableval}" in |
---|
184 | yes) RTEMS_USE_GCC272=no ;; |
---|
185 | no) RTEMS_USE_GCC272=yes ;; |
---|
186 | *) AC_MSG_ERROR(bad value ${enableval} for gcc-28 option) ;; |
---|
187 | esac],[RTEMS_USE_GCC272=no]) |
---|
188 | ]) |
---|
189 | |
---|
190 | dnl $Id$ |
---|
191 | |
---|
192 | AC_DEFUN(RTEMS_ENABLE_LIBCDIR, |
---|
193 | [ |
---|
194 | AC_ARG_ENABLE(libcdir, |
---|
195 | [ --enable-libcdir=directory set the directory for the C library], |
---|
196 | [ RTEMS_LIBC_DIR="${enableval}" ; \ |
---|
197 | test -d ${enableval} || AC_MSG_ERROR("$enableval is not a directory" ) ] ) |
---|
198 | AC_SUBST(RTEMS_LIBC_DIR)dnl |
---|
199 | ]) |
---|
200 | |
---|
201 | AC_DEFUN(RTEMS_ENABLE_BARE, |
---|
202 | [ |
---|
203 | AC_ARG_ENABLE(bare-cpu-cflags, |
---|
204 | [ --enable-bare-cpu-cflags specify a particular cpu cflag] |
---|
205 | [ (bare bsp specific)], |
---|
206 | [case "${enableval}" in |
---|
207 | no) BARE_CPU_CFLAGS="" ;; |
---|
208 | *) BARE_CPU_CFLAGS="${enableval}" ;; |
---|
209 | esac], |
---|
210 | [BARE_CPU_CFLAGS=""]) |
---|
211 | |
---|
212 | AC_ARG_ENABLE(bare-cpu-model, |
---|
213 | [ --enable-bare-cpu-model specify a particular cpu model] |
---|
214 | [ (bare bsp specific)], |
---|
215 | [case "${enableval}" in |
---|
216 | no) BARE_CPU_MODEL="" ;; |
---|
217 | *) BARE_CPU_MODEL="${enableval}" ;; |
---|
218 | esac], |
---|
219 | [BARE_CPU_MODEL=""]) |
---|
220 | ]) |
---|
221 | |
---|
222 | |
---|
223 | dnl $Id$ |
---|
224 | dnl |
---|
225 | dnl FIXME: this needs to be reworked |
---|
226 | |
---|
227 | AC_DEFUN(RTEMS_ENABLE_HWAPI, |
---|
228 | [dnl |
---|
229 | AC_ARG_ENABLE(hwapi, \ |
---|
230 | [ --enable-hwapi enable hardware API library], |
---|
231 | [case "${enableval}" in |
---|
232 | yes) RTEMS_HAS_HWAPI=yes ;; |
---|
233 | no) RTEMS_HAS_HWAPI=no ;; |
---|
234 | *) AC_MSG_ERROR(bad value ${enableval} for hwapi option) ;; |
---|
235 | esac],[RTEMS_HAS_HWAPI=no]) |
---|
236 | AC_SUBST(RTEMS_HAS_HWAPI)dnl |
---|
237 | ])dnl |
---|
238 | |
---|
239 | dnl $Id$ |
---|
240 | |
---|
241 | dnl Override the set of BSPs to be built. |
---|
242 | dnl used by the toplevel configure script |
---|
243 | dnl RTEMS_ENABLE_RTEMSBSP(rtems_bsp_list) |
---|
244 | AC_DEFUN(RTEMS_ENABLE_RTEMSBSP, |
---|
245 | [ |
---|
246 | AC_ARG_ENABLE(rtemsbsp, |
---|
247 | [ --enable-rtemsbsp=bsp1 bsp2 .. BSPs to include in build], |
---|
248 | [case "${enableval}" in |
---|
249 | yes|no) AC_MSG_ERROR([missing argument to --enable-rtemsbsp=\"bsp1 bsp2\"]);; |
---|
250 | *) $1=$enableval;; |
---|
251 | esac],[$1=""]) |
---|
252 | ]) |
---|
253 | |
---|
254 | dnl Pass a single BSP via an environment variable |
---|
255 | dnl used by per BSP configure scripts |
---|
256 | AC_DEFUN(RTEMS_ENV_RTEMSBSP, |
---|
257 | [dnl |
---|
258 | AC_MSG_CHECKING([for RTEMS_BSP]) |
---|
259 | AC_CACHE_VAL(rtems_cv_RTEMS_BSP, |
---|
260 | [dnl |
---|
261 | test -n "${RTEMS_BSP}" && rtems_cv_RTEMS_BSP="$RTEMS_BSP"; |
---|
262 | ])dnl |
---|
263 | if test -z "$rtems_cv_RTEMS_BSP"; then |
---|
264 | AC_MSG_ERROR([Missing RTEMS_BSP]) |
---|
265 | fi |
---|
266 | RTEMS_BSP="$rtems_cv_RTEMS_BSP" |
---|
267 | AC_MSG_RESULT(${RTEMS_BSP}) |
---|
268 | AC_SUBST(RTEMS_BSP) |
---|
269 | ]) |
---|
270 | |
---|
271 | dnl $Id$ |
---|
272 | |
---|
273 | dnl check if RTEMS support a cpu |
---|
274 | AC_DEFUN(RTEMS_CHECK_CPU, |
---|
275 | [dnl |
---|
276 | AC_REQUIRE([RTEMS_TOP]) |
---|
277 | AC_REQUIRE([RTEMS_CANONICAL_TARGET_CPU]) |
---|
278 | # Is this a supported CPU? |
---|
279 | AC_MSG_CHECKING([if cpu $RTEMS_CPU is supported]) |
---|
280 | if test -d "$srcdir/$RTEMS_TOPdir/c/src/exec/score/cpu/$RTEMS_CPU"; then |
---|
281 | AC_MSG_RESULT(yes) |
---|
282 | else |
---|
283 | AC_MSG_ERROR(no) |
---|
284 | fi |
---|
285 | ])dnl |
---|
286 | |
---|
287 | |
---|
288 | dnl $Id$ |
---|
289 | |
---|
290 | AC_DEFUN(RTEMS_CANONICAL_HOST, |
---|
291 | [dnl |
---|
292 | AC_REQUIRE([AC_CANONICAL_HOST]) |
---|
293 | RTEMS_HOST=$host_os |
---|
294 | changequote(,)dnl |
---|
295 | case "${target}" in |
---|
296 | # hpux unix port should go here |
---|
297 | i[3456]86-pc-linux*) # unix "simulator" port |
---|
298 | RTEMS_HOST=Linux |
---|
299 | ;; |
---|
300 | i[3456]86-*freebsd2*) # unix "simulator" port |
---|
301 | RTEMS_HOST=FreeBSD |
---|
302 | ;; |
---|
303 | sparc-sun-solaris*) # unix "simulator" port |
---|
304 | RTEMS_HOST=Solaris |
---|
305 | ;; |
---|
306 | *) |
---|
307 | ;; |
---|
308 | esac |
---|
309 | changequote([,])dnl |
---|
310 | AC_SUBST(RTEMS_HOST) |
---|
311 | ])dnl |
---|
312 | |
---|
313 | dnl |
---|
314 | dnl $Id$ |
---|
315 | dnl |
---|
316 | |
---|
317 | AC_DEFUN(RTEMS_PROJECT_ROOT, |
---|
318 | [dnl |
---|
319 | AC_REQUIRE([RTEMS_TOP]) |
---|
320 | if test "$TARGET_SUBDIR" = "." ; then |
---|
321 | PROJECT_ROOT=$RTEMS_TOPdir/'$(top_builddir)'; |
---|
322 | else |
---|
323 | PROJECT_ROOT=../$RTEMS_TOPdir/'$(top_builddir)' |
---|
324 | fi |
---|
325 | AC_SUBST(PROJECT_ROOT) |
---|
326 | |
---|
327 | RTEMS_ROOT=$RTEMS_TOPdir/'$(top_builddir)'/c/$RTEMS_BSP |
---|
328 | AC_SUBST(RTEMS_ROOT) |
---|
329 | |
---|
330 | INSTALL_CHANGE="\$(KSH) \$(PROJECT_ROOT)/tools/build/install-if-change" |
---|
331 | AC_SUBST(INSTALL_CHANGE) |
---|
332 | |
---|
333 | PACKHEX="\$(PROJECT_ROOT)/tools/build/packhex" |
---|
334 | AC_SUBST(PACKHEX) |
---|
335 | ]) |
---|
336 | |
---|
337 | |
---|
338 | dnl |
---|
339 | dnl $Id$ |
---|
340 | dnl |
---|
341 | dnl Check for target gcc |
---|
342 | dnl |
---|
343 | dnl 98/05/20 Ralf Corsepius (corsepiu@faw.uni-ulm.de) |
---|
344 | dnl Completely reworked |
---|
345 | |
---|
346 | AC_DEFUN(RTEMS_PROG_CC, |
---|
347 | [ |
---|
348 | AC_BEFORE([$0], [AC_PROG_CPP])dnl |
---|
349 | AC_BEFORE([$0], [AC_PROG_CC])dnl |
---|
350 | AC_REQUIRE([RTEMS_TOOL_PREFIX])dnl |
---|
351 | |
---|
352 | dnl Only accept gcc and cc |
---|
353 | dnl NOTE: This might be too restrictive for native compilation |
---|
354 | AC_PATH_PROGS(CC_FOR_TARGET, "$program_prefix"gcc "$program_prefix"cc ) |
---|
355 | test -z "$CC_FOR_TARGET" \ |
---|
356 | && AC_MSG_ERROR([no acceptable cc found in \$PATH]) |
---|
357 | |
---|
358 | dnl backup |
---|
359 | rtems_save_CC=$CC |
---|
360 | rtems_save_CFLAGS=$CFLAGS |
---|
361 | |
---|
362 | dnl temporarily set CC |
---|
363 | CC=$CC_FOR_TARGET |
---|
364 | |
---|
365 | AC_PROG_CC_WORKS |
---|
366 | AC_PROG_CC_GNU |
---|
367 | |
---|
368 | if test $ac_cv_prog_gcc = yes; then |
---|
369 | GCC=yes |
---|
370 | dnl Check whether -g works, even if CFLAGS is set, in case the package |
---|
371 | dnl plays around with CFLAGS (such as to build both debugging and |
---|
372 | dnl normal versions of a library), tasteless as that idea is. |
---|
373 | ac_test_CFLAGS="${CFLAGS+set}" |
---|
374 | ac_save_CFLAGS="$CFLAGS" |
---|
375 | CFLAGS= |
---|
376 | AC_PROG_CC_G |
---|
377 | if test "$ac_test_CFLAGS" = set; then |
---|
378 | CFLAGS="$ac_save_CFLAGS" |
---|
379 | elif test $ac_cv_prog_cc_g = yes; then |
---|
380 | CFLAGS="-g -O2" |
---|
381 | else |
---|
382 | CFLAGS="-O2" |
---|
383 | fi |
---|
384 | else |
---|
385 | GCC= |
---|
386 | test "${CFLAGS+set}" = set || CFLAGS="-g" |
---|
387 | fi |
---|
388 | |
---|
389 | rtems_cv_prog_gcc=$ac_cv_prog_gcc |
---|
390 | rtems_cv_prog_cc_g=$ac_cv_prog_cc_g |
---|
391 | rtems_cv_prog_cc_works=$ac_cv_prog_cc_works |
---|
392 | rtems_cv_prog_cc_cross=$ac_cv_prog_cc_cross |
---|
393 | |
---|
394 | dnl restore initial values |
---|
395 | CC=$rtems_save_CC |
---|
396 | CFLAGS=$rtems_save_CFLAGS |
---|
397 | |
---|
398 | unset ac_cv_prog_gcc |
---|
399 | unset ac_cv_prog_cc_g |
---|
400 | unset ac_cv_prog_cc_works |
---|
401 | unset ac_cv_prog_cc_cross |
---|
402 | ]) |
---|
403 | |
---|
404 | AC_DEFUN(RTEMS_PROG_CC_FOR_TARGET, |
---|
405 | [ |
---|
406 | dnl check target cc |
---|
407 | RTEMS_PROG_CC |
---|
408 | dnl check if the compiler supports --specs |
---|
409 | RTEMS_GCC_SPECS |
---|
410 | dnl check if the target compiler may use --pipe |
---|
411 | RTEMS_GCC_PIPE |
---|
412 | dnl check if the compiler supports --specs if gcc28 is requested |
---|
413 | if test "$RTEMS_USE_GCC272" != "yes" ; then |
---|
414 | if test "$rtems_cv_gcc_specs" = "no"; then |
---|
415 | AC_MSG_WARN([*** disabling --enable-gcc28]) |
---|
416 | RTEMS_USE_GCC272=yes |
---|
417 | fi |
---|
418 | fi |
---|
419 | test "$rtems_cv_gcc_pipe" = "yes" && CC_FOR_TARGET="$CC_FOR_TARGET --pipe" |
---|
420 | |
---|
421 | dnl FIXME: HACK for egcs/cygwin mixing '\\' and '/' in gcc -print-* |
---|
422 | case $host_os in |
---|
423 | *cygwin*) GCCSED="| sed 's%\\\\%/%g'" ;; |
---|
424 | *) ;; |
---|
425 | esac |
---|
426 | AC_SUBST(GCCSED) |
---|
427 | ]) |
---|
428 | |
---|
429 | dnl |
---|
430 | dnl $Id$ |
---|
431 | dnl |
---|
432 | dnl Set program_prefix |
---|
433 | dnl |
---|
434 | dnl 98/05/20 Ralf Corsepius (corsepiu@faw.uni-ulm.de) |
---|
435 | dnl Extracted from configure |
---|
436 | |
---|
437 | AC_DEFUN(RTEMS_TOOL_PREFIX, |
---|
438 | [AC_REQUIRE([AC_CANONICAL_TARGET])dnl |
---|
439 | AC_REQUIRE([AC_CANONICAL_BUILD])dnl |
---|
440 | |
---|
441 | changequote(,)dnl |
---|
442 | if [ "${program_prefix}" = "NONE" ] ; then |
---|
443 | if [ "${target}" = "${host}" ] ; then |
---|
444 | program_prefix= |
---|
445 | else |
---|
446 | program_prefix=${target}- |
---|
447 | fi |
---|
448 | fi |
---|
449 | changequote([,])dnl |
---|
450 | ]) |
---|
451 | |
---|
452 | dnl |
---|
453 | dnl $Id$ |
---|
454 | dnl |
---|
455 | dnl Check whether the target compiler accepts -specs |
---|
456 | dnl |
---|
457 | dnl 98/02/11 Ralf Corsepius corsepiu@faw.uni-ulm.de |
---|
458 | dnl |
---|
459 | |
---|
460 | AC_DEFUN(RTEMS_GCC_SPECS, |
---|
461 | [AC_REQUIRE([RTEMS_PROG_CC]) |
---|
462 | AC_CACHE_CHECK(whether $CC_FOR_TARGET accepts -specs,rtems_cv_gcc_specs, |
---|
463 | [ |
---|
464 | rtems_cv_gcc_specs=no |
---|
465 | if test "$rtems_cv_prog_gcc" = "yes"; then |
---|
466 | touch confspec |
---|
467 | echo 'void f(){}' >conftest.c |
---|
468 | if test -z "`${CC_FOR_TARGET} -specs confspec -c conftest.c 2>&1`";then |
---|
469 | rtems_cv_gcc_specs=yes |
---|
470 | fi |
---|
471 | fi |
---|
472 | rm -f confspec conftest* |
---|
473 | ])]) |
---|
474 | |
---|
475 | dnl |
---|
476 | dnl $Id$ |
---|
477 | dnl |
---|
478 | dnl Check whether the target compiler accepts -pipe |
---|
479 | dnl |
---|
480 | dnl 98/02/11 Ralf Corsepius corsepiu@faw.uni-ulm.de |
---|
481 | dnl |
---|
482 | |
---|
483 | AC_DEFUN(RTEMS_GCC_PIPE, |
---|
484 | [AC_REQUIRE([RTEMS_PROG_CC]) |
---|
485 | AC_REQUIRE([AC_CANONICAL_HOST]) |
---|
486 | AC_CACHE_CHECK(whether $CC_FOR_TARGET accepts --pipe,rtems_cv_gcc_pipe, |
---|
487 | [ |
---|
488 | rtems_cv_gcc_pipe=no |
---|
489 | if test "$rtems_cv_prog_gcc" = "yes"; then |
---|
490 | case "$host_os" in |
---|
491 | cygwin*) |
---|
492 | ;; |
---|
493 | *) |
---|
494 | echo 'void f(){}' >conftest.c |
---|
495 | if test -z "`${CC_FOR_TARGET} --pipe -c conftest.c 2>&1`";then |
---|
496 | rtems_cv_gcc_pipe=yes |
---|
497 | fi |
---|
498 | rm -f conftest* |
---|
499 | ;; |
---|
500 | esac |
---|
501 | fi |
---|
502 | ]) |
---|
503 | ]) |
---|
504 | |
---|
505 | dnl |
---|
506 | dnl $Id$ |
---|
507 | dnl |
---|
508 | dnl Check for target g++ |
---|
509 | dnl |
---|
510 | dnl 98/05/20 Ralf Corsepius (corsepiu@faw.uni-ulm.de) |
---|
511 | dnl Completely reworked |
---|
512 | |
---|
513 | AC_DEFUN(RTEMS_PROG_CXX, |
---|
514 | [ |
---|
515 | AC_BEFORE([$0], [AC_PROG_CXXCPP])dnl |
---|
516 | AC_BEFORE([$0], [AC_PROG_CXX])dnl |
---|
517 | AC_REQUIRE([RTEMS_TOOL_PREFIX])dnl |
---|
518 | |
---|
519 | dnl Only accept g++ and c++ |
---|
520 | dnl NOTE: This might be too restrictive for native compilation |
---|
521 | AC_PATH_PROGS(CXX_FOR_TARGET, "$program_prefix"g++ "$program_prefix"c++) |
---|
522 | test -z "$CXX_FOR_TARGET" \ |
---|
523 | && AC_MSG_ERROR([no acceptable c++ found in \$PATH]) |
---|
524 | |
---|
525 | dnl backup |
---|
526 | rtems_save_CXX=$CXX |
---|
527 | rtems_save_CXXFLAGS=$CXXFLAGS |
---|
528 | |
---|
529 | dnl temporarily set CXX |
---|
530 | CXX=$CXX_FOR_TARGET |
---|
531 | |
---|
532 | AC_PROG_CXX_WORKS |
---|
533 | AC_PROG_CXX_GNU |
---|
534 | |
---|
535 | if test $ac_cv_prog_gxx = yes; then |
---|
536 | GXX=yes |
---|
537 | dnl Check whether -g works, even if CXXFLAGS is set, in case the package |
---|
538 | dnl plays around with CXXFLAGS (such as to build both debugging and |
---|
539 | dnl normal versions of a library), tasteless as that idea is. |
---|
540 | ac_test_CXXFLAGS="${CXXFLAGS+set}" |
---|
541 | ac_save_CXXFLAGS="$CXXFLAGS" |
---|
542 | CXXFLAGS= |
---|
543 | AC_PROG_CXX_G |
---|
544 | if test "$ac_test_CXXFLAGS" = set; then |
---|
545 | CXXFLAGS="$ac_save_CXXFLAGS" |
---|
546 | elif test $ac_cv_prog_cxx_g = yes; then |
---|
547 | CXXFLAGS="-g -O2" |
---|
548 | else |
---|
549 | CXXFLAGS="-O2" |
---|
550 | fi |
---|
551 | else |
---|
552 | GXX= |
---|
553 | test "${CXXFLAGS+set}" = set || CXXFLAGS="-g" |
---|
554 | fi |
---|
555 | |
---|
556 | rtems_cv_prog_gxx=$ac_cv_prog_gxx |
---|
557 | rtems_cv_prog_cxx_g=$ac_cv_prog_cxx_g |
---|
558 | rtems_cv_prog_cxx_works=$ac_cv_prog_cxx_works |
---|
559 | rtems_cv_prog_cxx_cross=$ac_cv_prog_cxx_cross |
---|
560 | |
---|
561 | CXX=$rtems_save_CXX |
---|
562 | CXXFLAGS=$rtems_save_CXXFLAGS |
---|
563 | |
---|
564 | dnl restore initial values |
---|
565 | unset ac_cv_prog_gxx |
---|
566 | unset ac_cv_prog_cc_g |
---|
567 | unset ac_cv_prog_cxx_works |
---|
568 | unset ac_cv_prog_cxx_cross |
---|
569 | ]) |
---|
570 | |
---|
571 | AC_DEFUN(RTEMS_PROG_CXX_FOR_TARGET, |
---|
572 | [ |
---|
573 | RTEMS_PROG_CXX |
---|
574 | if test "$rtems_cv_prog_cc_cross" != "$rtems_cv_prog_cxx_cross"; then |
---|
575 | AC_MSG_ERROR([***] |
---|
576 | [Inconsistency in compiler configuration:] |
---|
577 | [Target C compiler and Target C++ compiler] |
---|
578 | [must both either be cross compilers or native compilers] |
---|
579 | [Hint: If building a posix bsp: LD_LIBRARY_PATH?] ) |
---|
580 | fi |
---|
581 | ]) |
---|
582 | |
---|
583 | dnl |
---|
584 | dnl $Id$ |
---|
585 | dnl |
---|
586 | dnl Set target tools |
---|
587 | dnl |
---|
588 | dnl 98/06/23 Ralf Corsepius (corsepiu@faw.uni-ulm.de) |
---|
589 | dnl fixing cache/environment variable handling |
---|
590 | dnl adding checks for cygwin/egcs '\\'-bug |
---|
591 | dnl adding checks for ranlib/ar -s problem |
---|
592 | dnl |
---|
593 | dnl 98/02/12 Ralf Corsepius (corsepiu@faw.uni-ulm.de) |
---|
594 | dnl |
---|
595 | |
---|
596 | AC_DEFUN(RTEMS_GCC_PRINT, |
---|
597 | [ case $host_os in |
---|
598 | *cygwin*) |
---|
599 | dnl FIXME: Hack for cygwin/egcs reporting mixed '\\' and '/' |
---|
600 | dnl Should be removed once cygwin/egcs reports '/' only |
---|
601 | $1=`$CC_FOR_TARGET --print-prog-name=$2 | sed -e 's%\\\\%/%g' ` |
---|
602 | ;; |
---|
603 | *) |
---|
604 | $1=`$CC_FOR_TARGET --print-prog-name=$2` |
---|
605 | ;; |
---|
606 | esac |
---|
607 | ]) |
---|
608 | |
---|
609 | AC_DEFUN(RTEMS_PATH_TOOL, |
---|
610 | [ |
---|
611 | AC_MSG_CHECKING([target's $2]) |
---|
612 | AC_CACHE_VAL(ac_cv_path_$1,:) |
---|
613 | AC_MSG_RESULT([$ac_cv_path_$1]) |
---|
614 | |
---|
615 | if test -n "$ac_cv_path_$1"; then |
---|
616 | dnl retrieve the value from the cache |
---|
617 | $1=$ac_cv_path_$1 |
---|
618 | else |
---|
619 | dnl the cache was not set |
---|
620 | if test -z "[$]$1" ; then |
---|
621 | if test "$rtems_cv_prog_gcc" = "yes"; then |
---|
622 | # We are using gcc, ask it about its tool |
---|
623 | # NOTE: Necessary if gcc was configured to use the target's |
---|
624 | # native tools or uses prefixes for gnutools (e.g. gas instead of as) |
---|
625 | RTEMS_GCC_PRINT($1,$2) |
---|
626 | fi |
---|
627 | else |
---|
628 | # The user set an environment variable. |
---|
629 | # Check whether it is an absolute path, otherwise AC_PATH_PROG |
---|
630 | # will override the environment variable, which isn't what the user |
---|
631 | # intends |
---|
632 | AC_MSG_CHECKING([whether environment variable $1 is an absolute path]) |
---|
633 | case "[$]$1" in |
---|
634 | /*) # valid |
---|
635 | AC_MSG_RESULT("yes") |
---|
636 | ;; |
---|
637 | *) # invalid for AC_PATH_PROG |
---|
638 | AC_MSG_RESULT("no") |
---|
639 | AC_MSG_ERROR([***] |
---|
640 | [Environment variable $1 should either] |
---|
641 | [be unset (preferred) or contain an absolute path]) |
---|
642 | ;; |
---|
643 | esac |
---|
644 | fi |
---|
645 | |
---|
646 | AC_PATH_PROG($1,"$program_prefix"$2,$3) |
---|
647 | fi |
---|
648 | ]) |
---|
649 | |
---|
650 | AC_DEFUN(RTEMS_CANONICALIZE_TOOLS, |
---|
651 | [AC_REQUIRE([RTEMS_PROG_CC])dnl |
---|
652 | |
---|
653 | dnl FIXME: What shall be done if these tools are not available? |
---|
654 | RTEMS_PATH_TOOL(AR_FOR_TARGET,ar,no) |
---|
655 | RTEMS_PATH_TOOL(AS_FOR_TARGET,as,no) |
---|
656 | RTEMS_PATH_TOOL(LD_FOR_TARGET,ld,no) |
---|
657 | RTEMS_PATH_TOOL(NM_FOR_TARGET,nm,no) |
---|
658 | |
---|
659 | dnl special treatment of ranlib |
---|
660 | RTEMS_PATH_TOOL(RANLIB_FOR_TARGET,ranlib,no) |
---|
661 | if test "$RANLIB_FOR_TARGET" = "no"; then |
---|
662 | # ranlib wasn't found; check if ar -s is available |
---|
663 | RTEMS_AR_FOR_TARGET_S |
---|
664 | if test $rtems_cv_AR_FOR_TARGET_S = "yes" ; then |
---|
665 | dnl override RANLIB_FOR_TARGET's cache |
---|
666 | ac_cv_path_RANLIB_FOR_TARGET="$AR_FOR_TARGET -s" |
---|
667 | RANLIB_FOR_TARGET=$ac_cv_path_RANLIB_FOR_TARGET |
---|
668 | else |
---|
669 | AC_MSG_ERROR([***] |
---|
670 | [Can't figure out how to build a library index] |
---|
671 | [Neither ranlib nor ar -s seem to be available] ) |
---|
672 | fi |
---|
673 | fi |
---|
674 | |
---|
675 | dnl NOTE: These may not be available if not using gnutools |
---|
676 | RTEMS_PATH_TOOL(OBJCOPY_FOR_TARGET,objcopy,no) |
---|
677 | RTEMS_PATH_TOOL(SIZE_FOR_TARGET,size,no) |
---|
678 | RTEMS_PATH_TOOL(STRIP_FOR_TARGET,strip,no) |
---|
679 | ]) |
---|
680 | |
---|
681 | dnl |
---|
682 | dnl $Id$ |
---|
683 | dnl |
---|
684 | |
---|
685 | AC_DEFUN(RTEMS_AR_FOR_TARGET_S, |
---|
686 | [ |
---|
687 | AC_CACHE_CHECK(whether $AR_FOR_TARGET -s works, |
---|
688 | rtems_cv_AR_FOR_TARGET_S, |
---|
689 | [ |
---|
690 | cat > conftest.$ac_ext <<EOF |
---|
691 | int foo( int b ) |
---|
692 | { return b; } |
---|
693 | EOF |
---|
694 | if AC_TRY_COMMAND($CC_FOR_TARGET -o conftest.o -c conftest.$ac_ext) \ |
---|
695 | && AC_TRY_COMMAND($AR_FOR_TARGET -sr conftest.a conftest.o) \ |
---|
696 | && test -s conftest.a ; \ |
---|
697 | then |
---|
698 | rtems_cv_AR_FOR_TARGET_S="yes" |
---|
699 | else |
---|
700 | rtems_cv_AR_FOR_TARGET_S="no" |
---|
701 | fi |
---|
702 | rm -f conftest* |
---|
703 | ]) |
---|
704 | ]) |
---|
705 | |
---|
706 | |
---|
707 | dnl |
---|
708 | dnl $Id$ |
---|
709 | dnl |
---|
710 | |
---|
711 | dnl check for i386 gas supporting 16 bit mode |
---|
712 | dnl - binutils 2.9.1.0.7 and higher |
---|
713 | |
---|
714 | AC_DEFUN(RTEMS_I386_GAS_CODE16, |
---|
715 | [ if test "${target_cpu}" = "i386"; then |
---|
716 | AC_CACHE_CHECK([for 16 bit mode assembler support], |
---|
717 | rtems_cv_prog_gas_code16, |
---|
718 | [cat > conftest.s << EOF |
---|
719 | .code16 |
---|
720 | data32 |
---|
721 | addr32 |
---|
722 | lgdt 0 |
---|
723 | EOF |
---|
724 | if AC_TRY_COMMAND($AS_FOR_TARGET -o conftest.o conftest.s); then |
---|
725 | rtems_cv_prog_gas_code16=yes |
---|
726 | else |
---|
727 | rtems_cv_prog_gas_code16=no |
---|
728 | fi]) |
---|
729 | RTEMS_GAS_CODE16="$rtems_cv_prog_gas_code16" |
---|
730 | fi |
---|
731 | AC_SUBST(RTEMS_GAS_CODE16) |
---|
732 | ]) |
---|
733 | |
---|
734 | |
---|
735 | dnl |
---|
736 | dnl $Id$ |
---|
737 | dnl |
---|
738 | dnl Check for System V IPC calls used by Unix simulators |
---|
739 | dnl |
---|
740 | dnl 98/07/17 Dario Alcocer alcocer@netcom.com |
---|
741 | dnl Ralf Corsepius corsepiu@faw.uni-ulm.de |
---|
742 | dnl |
---|
743 | dnl Note: $host_os should probably *not* ever be used here to |
---|
744 | dnl determine if host supports System V IPC calls, since some |
---|
745 | dnl (e.g. FreeBSD 2.x) are configured by default to include only |
---|
746 | dnl a subset of the System V IPC calls. Therefore, to make sure |
---|
747 | dnl all of the required calls are found, test for each call explicitly. |
---|
748 | dnl |
---|
749 | dnl All of the calls use IPC_PRIVATE, so tests will not unintentionally |
---|
750 | dnl modify any existing key sets. See the man pages for semget, shmget, |
---|
751 | dnl msgget, semctl, shmctl and msgctl for details. |
---|
752 | |
---|
753 | AC_DEFUN(RTEMS_SYSV_SEM, |
---|
754 | [AC_REQUIRE([AC_PROG_CC]) |
---|
755 | AC_REQUIRE([RTEMS_CANONICAL_HOST]) |
---|
756 | AC_CACHE_CHECK(whether $RTEMS_HOST supports System V semaphores, |
---|
757 | rtems_cv_sysv_sem, |
---|
758 | [ |
---|
759 | AC_TRY_RUN([ |
---|
760 | #include <sys/types.h> |
---|
761 | #include <sys/ipc.h> |
---|
762 | #include <sys/sem.h> |
---|
763 | int main () { |
---|
764 | #if !defined(sun) |
---|
765 | union semun arg ; |
---|
766 | #else |
---|
767 | union semun { |
---|
768 | int val; |
---|
769 | struct semid_ds *buf; |
---|
770 | ushort *array; |
---|
771 | } arg; |
---|
772 | #endif |
---|
773 | int id=semget(IPC_PRIVATE,1,IPC_CREAT|0400); |
---|
774 | if (id == -1) |
---|
775 | exit(1); |
---|
776 | arg.val = 0; /* avoid implicit type cast to union */ |
---|
777 | if (semctl(id, 0, IPC_RMID, arg) == -1) |
---|
778 | exit(1); |
---|
779 | exit(0); |
---|
780 | } |
---|
781 | ], |
---|
782 | rtems_cv_sysv_sem="yes", rtems_cv_sysv_sem="no", :) |
---|
783 | ]) |
---|
784 | ]) |
---|
785 | |
---|
786 | AC_DEFUN(RTEMS_SYSV_SHM, |
---|
787 | [AC_REQUIRE([AC_PROG_CC]) |
---|
788 | AC_REQUIRE([RTEMS_CANONICAL_HOST]) |
---|
789 | AC_CACHE_CHECK(whether $RTEMS_HOST supports System V shared memory, |
---|
790 | rtems_cv_sysv_shm, |
---|
791 | [ |
---|
792 | AC_TRY_RUN([ |
---|
793 | #include <sys/types.h> |
---|
794 | #include <sys/ipc.h> |
---|
795 | #include <sys/shm.h> |
---|
796 | int main () { |
---|
797 | int id=shmget(IPC_PRIVATE,1,IPC_CREAT|0400); |
---|
798 | if (id == -1) |
---|
799 | exit(1); |
---|
800 | if (shmctl(id, IPC_RMID, 0) == -1) |
---|
801 | exit(1); |
---|
802 | exit(0); |
---|
803 | } |
---|
804 | ], |
---|
805 | rtems_cv_sysv_shm="yes", rtems_cv_sysv_shm="no", :) |
---|
806 | ]) |
---|
807 | ]) |
---|
808 | |
---|
809 | AC_DEFUN(RTEMS_SYSV_MSG, |
---|
810 | [AC_REQUIRE([AC_PROG_CC]) |
---|
811 | AC_REQUIRE([RTEMS_CANONICAL_HOST]) |
---|
812 | AC_CACHE_CHECK(whether $RTEMS_HOST supports System V messages, |
---|
813 | rtems_cv_sysv_msg, |
---|
814 | [ |
---|
815 | AC_TRY_RUN([ |
---|
816 | #include <sys/types.h> |
---|
817 | #include <sys/ipc.h> |
---|
818 | #include <sys/msg.h> |
---|
819 | int main () { |
---|
820 | int id=msgget(IPC_PRIVATE,IPC_CREAT|0400); |
---|
821 | if (id == -1) |
---|
822 | exit(1); |
---|
823 | if (msgctl(id, IPC_RMID, 0) == -1) |
---|
824 | exit(1); |
---|
825 | exit(0); |
---|
826 | } |
---|
827 | ], |
---|
828 | rtems_cv_sysv_msg="yes", rtems_cv_sysv_msg="no", :) |
---|
829 | ]) |
---|
830 | ]) |
---|
831 | |
---|
832 | AC_DEFUN(RTEMS_CHECK_SYSV_UNIX, |
---|
833 | [AC_REQUIRE([RTEMS_CANONICAL_HOST]) |
---|
834 | if test "$RTEMS_CPU" = "unix" ; then |
---|
835 | RTEMS_SYSV_SEM |
---|
836 | if test "$rtems_cv_sysv_sem" != "yes" ; then |
---|
837 | AC_MSG_ERROR([System V semaphores don't work, required by simulator]) |
---|
838 | fi |
---|
839 | RTEMS_SYSV_SHM |
---|
840 | if test "$rtems_cv_sysv_shm" != "yes" ; then |
---|
841 | AC_MSG_ERROR([System V shared memory doesn't work, required by simulator]) |
---|
842 | fi |
---|
843 | RTEMS_SYSV_MSG |
---|
844 | if test "$rtems_cv_sysv_msg" != "yes" ; then |
---|
845 | AC_MSG_ERROR([System V messages don't work, required by simulator]) |
---|
846 | fi |
---|
847 | fi |
---|
848 | ]) |
---|
849 | |
---|
850 | dnl $Id$ |
---|
851 | |
---|
852 | dnl Report all available bsps for a target, |
---|
853 | dnl check if a bsp-subdirectory is present for all bsps found |
---|
854 | dnl |
---|
855 | dnl RTEMS_CHECK_BSPS(bsp_list) |
---|
856 | AC_DEFUN(RTEMS_CHECK_BSPS, |
---|
857 | [ |
---|
858 | AC_REQUIRE([RTEMS_CHECK_CPU])dnl sets RTEMS_CPU, target |
---|
859 | AC_REQUIRE([RTEMS_TOP])dnl sets RTEMS_TOPdir |
---|
860 | AC_MSG_CHECKING([for bsps]) |
---|
861 | case "${target}" in |
---|
862 | changequote(,)dnl |
---|
863 | i[3456]86-go32-rtems*) |
---|
864 | changequote([,])dnl |
---|
865 | $1="go32 go32_p5" |
---|
866 | ;; |
---|
867 | *) |
---|
868 | files=`ls $srcdir/$RTEMS_TOPdir/c/src/lib/libbsp/$RTEMS_CPU` |
---|
869 | for file in $files; do |
---|
870 | case $file in |
---|
871 | shared*);; |
---|
872 | Makefile*);; |
---|
873 | READ*);; |
---|
874 | CVS*);; |
---|
875 | pxfl*);; |
---|
876 | go32*);; # so the i386 port can pick up the other Makefiles |
---|
877 | # Now account for BSPs with build variants |
---|
878 | gen68360) rtems_bsp="$rtems_bsp gen68360 gen68360_040";; |
---|
879 | p4000) rtems_bsp="$rtems_bsp p4600 p4650";; |
---|
880 | mvme162) rtems_bsp="$rtems_bsp mvme162 mvme162lx";; |
---|
881 | *) $1="[$]$1 $file";; |
---|
882 | esac; |
---|
883 | done |
---|
884 | ;; |
---|
885 | esac |
---|
886 | AC_MSG_RESULT([[$]$1 .. done]) |
---|
887 | ])dnl |
---|
888 | |
---|
889 | AC_DEFUN(RTEMS_CHECK_CUSTOM_BSP, |
---|
890 | [dnl |
---|
891 | AC_MSG_CHECKING([for make/custom/[$]$1.cfg]) |
---|
892 | if test -r "$srcdir/$RTEMS_TOPdir/make/custom/[$]$1.cfg"; then |
---|
893 | AC_MSG_RESULT([yes]) |
---|
894 | else |
---|
895 | AC_MSG_ERROR([no]) |
---|
896 | fi |
---|
897 | ])dnl |
---|
898 | |
---|
899 | dnl |
---|
900 | dnl $Id$ |
---|
901 | dnl |
---|
902 | |
---|
903 | AC_DEFUN(RTEMS_CHECK_MULTIPROCESSING, |
---|
904 | [dnl |
---|
905 | AC_REQUIRE([RTEMS_TOP])dnl |
---|
906 | AC_REQUIRE([RTEMS_CHECK_CPU])dnl |
---|
907 | AC_CACHE_CHECK([whether BSP supports multiprocessing], |
---|
908 | rtems_cv_HAS_MP, |
---|
909 | [dnl |
---|
910 | if test -d "$srcdir/${RTEMS_TOPdir}/c/src/lib/libbsp/${RTEMS_CPU}/${$1}/shmsupp"; then |
---|
911 | if test "$RTEMS_HAS_MULTIPROCESSING" = "yes"; then |
---|
912 | rtems_cv_HAS_MP="yes" ; |
---|
913 | else |
---|
914 | rtems_cv_HAS_MP="disabled"; |
---|
915 | fi |
---|
916 | else |
---|
917 | rtems_cv_HAS_MP="no"; |
---|
918 | fi]) |
---|
919 | if test "$rtems_cv_HAS_MP" = "yes"; then |
---|
920 | HAS_MP="yes" |
---|
921 | else |
---|
922 | HAS_MP="no" |
---|
923 | fi |
---|
924 | AC_SUBST(HAS_MP) |
---|
925 | ]) |
---|
926 | |
---|
927 | dnl $Id$ |
---|
928 | dnl |
---|
929 | AC_DEFUN(RTEMS_CHECK_CXX, |
---|
930 | [dnl |
---|
931 | AC_REQUIRE([RTEMS_CHECK_CPU])dnl |
---|
932 | AC_REQUIRE([RTEMS_PROG_CXX_FOR_TARGET])dnl |
---|
933 | AC_CACHE_VAL(rtems_cv_HAS_CPLUSPLUS, |
---|
934 | [dnl |
---|
935 | if test "$RTEMS_HAS_CPLUSPLUS" = "yes"; then |
---|
936 | if test -n "$CXX_FOR_TARGET"; then |
---|
937 | rtems_cv_HAS_CPLUSPLUS="yes"; |
---|
938 | else |
---|
939 | rtems_cv_HAS_CPLUSPLUS="no"; |
---|
940 | fi |
---|
941 | else |
---|
942 | rtems_cv_HAS_CPLUSPLUS="no"; |
---|
943 | fi |
---|
944 | ])dnl |
---|
945 | HAS_CPLUSPLUS="$rtems_cv_HAS_CPLUSPLUS"; |
---|
946 | AC_SUBST(HAS_CPLUSPLUS)dnl |
---|
947 | ]) |
---|
948 | |
---|
949 | dnl $Id$ |
---|
950 | dnl |
---|
951 | AC_DEFUN(RTEMS_CHECK_NETWORKING, |
---|
952 | [dnl |
---|
953 | AC_REQUIRE([RTEMS_CHECK_CPU])dnl |
---|
954 | AC_CACHE_VAL(rtems_cv_HAS_NETWORKING, |
---|
955 | [dnl |
---|
956 | if test "$RTEMS_HAS_NETWORKING" = "yes"; then |
---|
957 | rtems_cv_HAS_NETWORKING="yes"; |
---|
958 | else |
---|
959 | rtems_cv_HAS_NETWORKING="no"; |
---|
960 | fi |
---|
961 | ])dnl |
---|
962 | HAS_NETWORKING="$rtems_cv_HAS_NETWORKING"; |
---|
963 | AC_SUBST(HAS_NETWORKING)dnl |
---|
964 | ]) |
---|
965 | |
---|
966 | dnl |
---|
967 | dnl $Id$ |
---|
968 | dnl |
---|
969 | |
---|
970 | dnl RTEMS_BSP_ALIAS(BSP_ALIAS,BSP_RETURNED) |
---|
971 | dnl convert a bsp alias $1 into its bsp directory $2 |
---|
972 | AC_DEFUN(RTEMS_BSP_ALIAS, |
---|
973 | [ |
---|
974 | # account for "aliased" bsps which share source code |
---|
975 | case $1 in |
---|
976 | mvme162lx) $2=mvme162 ;; # mvme162 board variant |
---|
977 | gen68360_040) $2=gen68360 ;; # 68360 in companion mode |
---|
978 | go32_p5) $2=go32 ;; # go32 on Pentium class CPU |
---|
979 | p4600) $2=p4000 ;; # p4000 board with IDT 4600 |
---|
980 | p4650) $2=p4000 ;; # p4000 board with IDT 4650 |
---|
981 | *) $2=$1;; |
---|
982 | esac |
---|
983 | ]) |
---|
984 | |
---|
985 | dnl |
---|
986 | dnl $Id$ |
---|
987 | dnl |
---|
988 | |
---|
989 | dnl RTEMS_CHECK_MAKEFILE(path) |
---|
990 | dnl Search for Makefile.in's within the directory starting |
---|
991 | dnl at path and append an entry for Makefile to global variable |
---|
992 | dnl "makefiles" (from configure.in) for each Makefile.in found |
---|
993 | dnl |
---|
994 | AC_DEFUN(RTEMS_CHECK_MAKEFILE, |
---|
995 | [RTEMS_CHECK_FILES_IN($1,Makefile,makefiles) |
---|
996 | ]) |
---|
997 | |
---|
998 | dnl |
---|
999 | dnl $Id$ |
---|
1000 | dnl |
---|
1001 | |
---|
1002 | dnl RTEMS_CHECK_FILES_IN(path,file,var) |
---|
1003 | dnl path .. path relative to srcdir, where to start searching for files |
---|
1004 | dnl file .. name of the files to search for |
---|
1005 | dnl var .. shell variable to append files found |
---|
1006 | |
---|
1007 | AC_DEFUN(RTEMS_CHECK_FILES_IN, |
---|
1008 | [ |
---|
1009 | AC_MSG_CHECKING(for $2.in in $1) |
---|
1010 | if test -d $srcdir/$1; then |
---|
1011 | rtems_av_save_dir=`pwd`; |
---|
1012 | cd $srcdir; |
---|
1013 | rtems_av_tmp=`find $1 -name "$2.in" -print | sed "s/$2\.in/%/" | sort | sed "s/%/$2/"` |
---|
1014 | $3="$$3 $rtems_av_tmp"; |
---|
1015 | cd $rtems_av_save_dir; |
---|
1016 | AC_MSG_RESULT(done) |
---|
1017 | else |
---|
1018 | AC_MSG_RESULT(no) |
---|
1019 | fi |
---|
1020 | ]) |
---|
1021 | |
---|
1022 | |
---|
1023 | dnl $Id$ |
---|
1024 | dnl |
---|
1025 | AC_DEFUN(RTEMS_CHECK_RDBG, |
---|
1026 | [dnl |
---|
1027 | AC_REQUIRE([RTEMS_TOP])dnl |
---|
1028 | AC_REQUIRE([RTEMS_CHECK_CPU])dnl |
---|
1029 | AC_CACHE_CHECK([whether BSP supports librdbg], |
---|
1030 | rtems_cv_HAS_RDBG, |
---|
1031 | [ |
---|
1032 | if test -d "$srcdir/${RTEMS_TOPdir}/c/src/lib/librdbg/${RTEMS_CPU}/${$1}"; then |
---|
1033 | rtems_cv_HAS_RDBG="yes" ; |
---|
1034 | else |
---|
1035 | rtems_cv_HAS_RDBG="no"; |
---|
1036 | fi |
---|
1037 | ]) |
---|
1038 | HAS_RDBG="$rtems_cv_HAS_RDBG" |
---|
1039 | AC_SUBST(HAS_RDBG) |
---|
1040 | ]) |
---|
1041 | |
---|