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 | # Do all the work for Automake. This macro actually does too much -- |
---|
89 | # some checks are only needed if your package does certain things. |
---|
90 | # But this isn't really a big deal. |
---|
91 | |
---|
92 | # serial 1 |
---|
93 | |
---|
94 | dnl Usage: |
---|
95 | dnl AM_INIT_AUTOMAKE(package,version, [no-define]) |
---|
96 | |
---|
97 | AC_DEFUN(AM_INIT_AUTOMAKE, |
---|
98 | [AC_REQUIRE([AC_PROG_INSTALL]) |
---|
99 | PACKAGE=[$1] |
---|
100 | AC_SUBST(PACKAGE) |
---|
101 | VERSION=[$2] |
---|
102 | AC_SUBST(VERSION) |
---|
103 | dnl test to see if srcdir already configured |
---|
104 | if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then |
---|
105 | AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) |
---|
106 | fi |
---|
107 | ifelse([$3],, |
---|
108 | AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) |
---|
109 | AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])) |
---|
110 | AC_REQUIRE([AM_SANITY_CHECK]) |
---|
111 | AC_REQUIRE([AC_ARG_PROGRAM]) |
---|
112 | dnl FIXME This is truly gross. |
---|
113 | missing_dir=`cd $ac_aux_dir && pwd` |
---|
114 | AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir) |
---|
115 | AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir) |
---|
116 | AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir) |
---|
117 | AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir) |
---|
118 | AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir) |
---|
119 | AC_REQUIRE([AC_PROG_MAKE_SET])]) |
---|
120 | |
---|
121 | # |
---|
122 | # Check to make sure that the build environment is sane. |
---|
123 | # |
---|
124 | |
---|
125 | AC_DEFUN(AM_SANITY_CHECK, |
---|
126 | [AC_MSG_CHECKING([whether build environment is sane]) |
---|
127 | # Just in case |
---|
128 | sleep 1 |
---|
129 | echo timestamp > conftestfile |
---|
130 | # Do `set' in a subshell so we don't clobber the current shell's |
---|
131 | # arguments. Must try -L first in case configure is actually a |
---|
132 | # symlink; some systems play weird games with the mod time of symlinks |
---|
133 | # (eg FreeBSD returns the mod time of the symlink's containing |
---|
134 | # directory). |
---|
135 | if ( |
---|
136 | set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null` |
---|
137 | if test "[$]*" = "X"; then |
---|
138 | # -L didn't work. |
---|
139 | set X `ls -t $srcdir/configure conftestfile` |
---|
140 | fi |
---|
141 | if test "[$]*" != "X $srcdir/configure conftestfile" \ |
---|
142 | && test "[$]*" != "X conftestfile $srcdir/configure"; then |
---|
143 | |
---|
144 | # If neither matched, then we have a broken ls. This can happen |
---|
145 | # if, for instance, CONFIG_SHELL is bash and it inherits a |
---|
146 | # broken ls alias from the environment. This has actually |
---|
147 | # happened. Such a system could not be considered "sane". |
---|
148 | AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken |
---|
149 | alias in your environment]) |
---|
150 | fi |
---|
151 | |
---|
152 | test "[$]2" = conftestfile |
---|
153 | ) |
---|
154 | then |
---|
155 | # Ok. |
---|
156 | : |
---|
157 | else |
---|
158 | AC_MSG_ERROR([newly created file is older than distributed files! |
---|
159 | Check your system clock]) |
---|
160 | fi |
---|
161 | rm -f conftest* |
---|
162 | AC_MSG_RESULT(yes)]) |
---|
163 | |
---|
164 | dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY) |
---|
165 | dnl The program must properly implement --version. |
---|
166 | AC_DEFUN(AM_MISSING_PROG, |
---|
167 | [AC_MSG_CHECKING(for working $2) |
---|
168 | # Run test in a subshell; some versions of sh will print an error if |
---|
169 | # an executable is not found, even if stderr is redirected. |
---|
170 | # Redirect stdin to placate older versions of autoconf. Sigh. |
---|
171 | if ($2 --version) < /dev/null > /dev/null 2>&1; then |
---|
172 | $1=$2 |
---|
173 | AC_MSG_RESULT(found) |
---|
174 | else |
---|
175 | $1="$3/missing $2" |
---|
176 | AC_MSG_RESULT(missing) |
---|
177 | fi |
---|
178 | AC_SUBST($1)]) |
---|
179 | |
---|
180 | # Add --enable-maintainer-mode option to configure. |
---|
181 | # From Jim Meyering |
---|
182 | |
---|
183 | # serial 1 |
---|
184 | |
---|
185 | AC_DEFUN(AM_MAINTAINER_MODE, |
---|
186 | [AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) |
---|
187 | dnl maintainer-mode is disabled by default |
---|
188 | AC_ARG_ENABLE(maintainer-mode, |
---|
189 | [ --enable-maintainer-mode enable make rules and dependencies not useful |
---|
190 | (and sometimes confusing) to the casual installer], |
---|
191 | USE_MAINTAINER_MODE=$enableval, |
---|
192 | USE_MAINTAINER_MODE=no) |
---|
193 | AC_MSG_RESULT($USE_MAINTAINER_MODE) |
---|
194 | AM_CONDITIONAL(MAINTAINER_MODE, test $USE_MAINTAINER_MODE = yes) |
---|
195 | MAINT=$MAINTAINER_MODE_TRUE |
---|
196 | AC_SUBST(MAINT)dnl |
---|
197 | ] |
---|
198 | ) |
---|
199 | |
---|
200 | # Define a conditional. |
---|
201 | |
---|
202 | AC_DEFUN(AM_CONDITIONAL, |
---|
203 | [AC_SUBST($1_TRUE) |
---|
204 | AC_SUBST($1_FALSE) |
---|
205 | if $2; then |
---|
206 | $1_TRUE= |
---|
207 | $1_FALSE='#' |
---|
208 | else |
---|
209 | $1_TRUE='#' |
---|
210 | $1_FALSE= |
---|
211 | fi]) |
---|
212 | |
---|
213 | dnl $Id$ |
---|
214 | |
---|
215 | AC_DEFUN(RTEMS_ENABLE_MULTIPROCESSING, |
---|
216 | [ |
---|
217 | AC_ARG_ENABLE(multiprocessing, |
---|
218 | [ --enable-multiprocessing enable multiprocessing interface], |
---|
219 | [case "${enableval}" in |
---|
220 | yes) RTEMS_HAS_MULTIPROCESSING=yes ;; |
---|
221 | no) RTEMS_HAS_MULTIPROCESSING=no ;; |
---|
222 | *) AC_MSG_ERROR(bad value ${enableval} for enable-multiprocessing option) ;; |
---|
223 | esac],[RTEMS_HAS_MULTIPROCESSING=no]) |
---|
224 | AC_SUBST(RTEMS_HAS_MULTIPROCESSING)dnl |
---|
225 | ]) |
---|
226 | |
---|
227 | dnl $Id$ |
---|
228 | |
---|
229 | AC_DEFUN(RTEMS_ENABLE_POSIX, |
---|
230 | [ |
---|
231 | AC_ARG_ENABLE(posix, |
---|
232 | [ --enable-posix enable posix interface], |
---|
233 | [case "${enableval}" in |
---|
234 | yes) RTEMS_HAS_POSIX_API=yes ;; |
---|
235 | no) RTEMS_HAS_POSIX_API=no ;; |
---|
236 | *) AC_MSG_ERROR(bad value ${enableval} for enable-posix option) ;; |
---|
237 | esac],[RTEMS_HAS_POSIX_API=yes]) |
---|
238 | AC_SUBST(RTEMS_HAS_POSIX_API) |
---|
239 | |
---|
240 | changequote(,)dnl |
---|
241 | case "${target}" in |
---|
242 | # hpux unix port should go here |
---|
243 | i[3456]86-go32-rtems*) |
---|
244 | RTEMS_HAS_POSIX_API=no |
---|
245 | ;; |
---|
246 | i[3456]86-pc-linux*) # unix "simulator" port |
---|
247 | RTEMS_HAS_POSIX_API=no |
---|
248 | ;; |
---|
249 | i[3456]86-*freebsd2*) # unix "simulator" port |
---|
250 | RTEMS_HAS_POSIX_API=no |
---|
251 | ;; |
---|
252 | no_cpu-*rtems*) |
---|
253 | RTEMS_HAS_POSIX_API=no |
---|
254 | ;; |
---|
255 | sparc-sun-solaris*) # unix "simulator" port |
---|
256 | RTEMS_HAS_POSIX_API=no |
---|
257 | ;; |
---|
258 | *) |
---|
259 | ;; |
---|
260 | esac |
---|
261 | changequote([,])dnl |
---|
262 | AC_SUBST(RTEMS_HAS_POSIX_API) |
---|
263 | ]) |
---|
264 | |
---|
265 | dnl $Id$ |
---|
266 | |
---|
267 | AC_DEFUN(RTEMS_ENABLE_NETWORKING, |
---|
268 | [ |
---|
269 | AC_ARG_ENABLE(networking, |
---|
270 | [ --enable-networking enable TCP/IP stack], |
---|
271 | [case "${enableval}" in |
---|
272 | yes) RTEMS_HAS_NETWORKING=yes ;; |
---|
273 | no) RTEMS_HAS_NETWORKING=no ;; |
---|
274 | *) AC_MSG_ERROR(bad value ${enableval} for enable-networking option) ;; |
---|
275 | esac],[RTEMS_HAS_NETWORKING=yes]) |
---|
276 | AC_SUBST(RTEMS_HAS_NETWORKING)dnl |
---|
277 | ]) |
---|
278 | |
---|
279 | dnl $Id$ |
---|
280 | |
---|
281 | AC_DEFUN(RTEMS_ENABLE_RDBG, |
---|
282 | [ |
---|
283 | AC_ARG_ENABLE(rdbg, |
---|
284 | [ --enable-rdbg enable remote debugger], |
---|
285 | [case "${enableval}" in |
---|
286 | yes) RTEMS_HAS_RDBG=yes ;; |
---|
287 | no) RTEMS_HAS_RDBG=no ;; |
---|
288 | *) AC_MSG_ERROR(bad value ${enableval} for enable-rdbg option) ;; |
---|
289 | esac],[RTEMS_HAS_RDBG=no]) |
---|
290 | AC_SUBST(RTEMS_HAS_RDBG)dnl |
---|
291 | ]) |
---|
292 | |
---|
293 | dnl $Id$ |
---|
294 | |
---|
295 | AC_DEFUN(RTEMS_ENABLE_INLINES, |
---|
296 | [AC_ARG_ENABLE(rtems-inlines, |
---|
297 | [ --enable-rtems-inlines enable RTEMS inline functions] |
---|
298 | [ (default:enabled, disable to use macros)], |
---|
299 | [case "${enableval}" in |
---|
300 | yes) RTEMS_USE_MACROS=no ;; |
---|
301 | no) RTEMS_USE_MACROS=yes ;; |
---|
302 | *) AC_MSG_ERROR(bad value ${enableval} for disable-rtems-inlines option) ;; |
---|
303 | esac],[RTEMS_USE_MACROS=no]) |
---|
304 | AC_SUBST(RTEMS_USE_MACROS)dnl |
---|
305 | ]) |
---|
306 | |
---|
307 | dnl $Id$ |
---|
308 | |
---|
309 | AC_DEFUN(RTEMS_ENABLE_CXX, |
---|
310 | [ |
---|
311 | AC_ARG_ENABLE(cxx, |
---|
312 | [ --enable-cxx enable C++ support,] |
---|
313 | [ and build the rtems++ library], |
---|
314 | [case "${enableval}" in |
---|
315 | yes) RTEMS_HAS_CPLUSPLUS=yes ;; |
---|
316 | no) RTEMS_HAS_CPLUSPLUS=no ;; |
---|
317 | *) AC_MSG_ERROR(bad value ${enableval} for enable-cxx option) ;; |
---|
318 | esac], [RTEMS_HAS_CPLUSPLUS=no]) |
---|
319 | ]) |
---|
320 | |
---|
321 | dnl $Id$ |
---|
322 | |
---|
323 | AC_DEFUN(RTEMS_ENABLE_GCC28, |
---|
324 | [ |
---|
325 | AC_ARG_ENABLE(gcc28, |
---|
326 | [ --enable-gcc28 enable use of gcc 2.8.x features], |
---|
327 | [case "${enableval}" in |
---|
328 | yes) RTEMS_USE_GCC272=no ;; |
---|
329 | no) RTEMS_USE_GCC272=yes ;; |
---|
330 | *) AC_MSG_ERROR(bad value ${enableval} for gcc-28 option) ;; |
---|
331 | esac],[RTEMS_USE_GCC272=no]) |
---|
332 | ]) |
---|
333 | |
---|
334 | dnl $Id$ |
---|
335 | |
---|
336 | AC_DEFUN(RTEMS_ENABLE_LIBCDIR, |
---|
337 | [ |
---|
338 | AC_ARG_ENABLE(libcdir, |
---|
339 | [ --enable-libcdir=directory set the directory for the C library], |
---|
340 | [ RTEMS_LIBC_DIR="${enableval}" ; \ |
---|
341 | test -d ${enableval} || AC_MSG_ERROR("$enableval is not a directory" ) ] ) |
---|
342 | AC_SUBST(RTEMS_LIBC_DIR)dnl |
---|
343 | ]) |
---|
344 | |
---|
345 | AC_DEFUN(RTEMS_ENABLE_BARE, |
---|
346 | [ |
---|
347 | AC_ARG_ENABLE(bare-cpu-cflags, |
---|
348 | [ --enable-bare-cpu-cflags specify a particular cpu cflag] |
---|
349 | [ (bare bsp specific)], |
---|
350 | [case "${enableval}" in |
---|
351 | no) BARE_CPU_CFLAGS="" ;; |
---|
352 | *) BARE_CPU_CFLAGS="${enableval}" ;; |
---|
353 | esac], |
---|
354 | [BARE_CPU_CFLAGS=""]) |
---|
355 | |
---|
356 | AC_ARG_ENABLE(bare-cpu-model, |
---|
357 | [ --enable-bare-cpu-model specify a particular cpu model] |
---|
358 | [ (bare bsp specific)], |
---|
359 | [case "${enableval}" in |
---|
360 | no) BARE_CPU_MODEL="" ;; |
---|
361 | *) BARE_CPU_MODEL="${enableval}" ;; |
---|
362 | esac], |
---|
363 | [BARE_CPU_MODEL=""]) |
---|
364 | ]) |
---|
365 | |
---|
366 | |
---|
367 | dnl $Id$ |
---|
368 | |
---|
369 | dnl Override the set of BSPs to be built. |
---|
370 | dnl used by the toplevel configure script |
---|
371 | dnl RTEMS_ENABLE_RTEMSBSP(rtems_bsp_list) |
---|
372 | AC_DEFUN(RTEMS_ENABLE_RTEMSBSP, |
---|
373 | [ |
---|
374 | AC_ARG_ENABLE(rtemsbsp, |
---|
375 | [ --enable-rtemsbsp=bsp1 bsp2 .. BSPs to include in build], |
---|
376 | [case "${enableval}" in |
---|
377 | yes|no) AC_MSG_ERROR([missing argument to --enable-rtemsbsp=\"bsp1 bsp2\"]);; |
---|
378 | *) $1=$enableval;; |
---|
379 | esac],[$1=""]) |
---|
380 | ]) |
---|
381 | |
---|
382 | dnl Pass a single BSP via an environment variable |
---|
383 | dnl used by per BSP configure scripts |
---|
384 | AC_DEFUN(RTEMS_ENV_RTEMSBSP, |
---|
385 | [dnl |
---|
386 | AC_MSG_CHECKING([for RTEMS_BSP]) |
---|
387 | AC_CACHE_VAL(rtems_cv_RTEMS_BSP, |
---|
388 | [dnl |
---|
389 | test -n "${RTEMS_BSP}" && rtems_cv_RTEMS_BSP="$RTEMS_BSP"; |
---|
390 | ])dnl |
---|
391 | if test -z "$rtems_cv_RTEMS_BSP"; then |
---|
392 | AC_MSG_ERROR([Missing RTEMS_BSP]) |
---|
393 | fi |
---|
394 | RTEMS_BSP="$rtems_cv_RTEMS_BSP" |
---|
395 | AC_MSG_RESULT(${RTEMS_BSP}) |
---|
396 | AC_SUBST(RTEMS_BSP) |
---|
397 | ]) |
---|
398 | |
---|
399 | dnl $Id$ |
---|
400 | |
---|
401 | AC_DEFUN(RTEMS_PATH_PERL, |
---|
402 | [ |
---|
403 | AC_PATH_PROG(PERL,perl) |
---|
404 | if test -z "$PERL" ; then |
---|
405 | AC_MSG_WARN( |
---|
406 | [***] |
---|
407 | [ perl was not found] |
---|
408 | [ Note: Some tools will not be built.]) |
---|
409 | fi |
---|
410 | ]) |
---|
411 | |
---|
412 | dnl $Id$ |
---|
413 | |
---|
414 | AC_DEFUN(RTEMS_PATH_KSH, |
---|
415 | [ |
---|
416 | dnl NOTE: prefer bash over ksh over sh |
---|
417 | AC_PATH_PROGS(KSH,bash ksh sh) |
---|
418 | if test -z "$KSH"; then |
---|
419 | dnl NOTE: This cannot happen -- /bin/sh must always exist |
---|
420 | AC_MSG_ERROR( |
---|
421 | [***] |
---|
422 | [ Cannot determine a usable shell bash/ksh/sh] |
---|
423 | [ Please contact your system administrator] ); |
---|
424 | fi |
---|
425 | ]) |
---|
426 | |
---|
427 | dnl $Id$ |
---|
428 | |
---|
429 | dnl check if RTEMS support a cpu |
---|
430 | AC_DEFUN(RTEMS_CHECK_CPU, |
---|
431 | [dnl |
---|
432 | AC_REQUIRE([RTEMS_TOP]) |
---|
433 | AC_REQUIRE([RTEMS_CANONICAL_TARGET_CPU]) |
---|
434 | # Is this a supported CPU? |
---|
435 | AC_MSG_CHECKING([if cpu $RTEMS_CPU is supported]) |
---|
436 | if test -d "$srcdir/$RTEMS_TOPdir/c/src/exec/score/cpu/$RTEMS_CPU"; then |
---|
437 | AC_MSG_RESULT(yes) |
---|
438 | else |
---|
439 | AC_MSG_ERROR(no) |
---|
440 | fi |
---|
441 | ])dnl |
---|
442 | |
---|
443 | |
---|
444 | dnl $Id$ |
---|
445 | |
---|
446 | AC_DEFUN(RTEMS_CANONICAL_HOST, |
---|
447 | [dnl |
---|
448 | AC_REQUIRE([AC_CANONICAL_HOST]) |
---|
449 | RTEMS_HOST=$host_os |
---|
450 | changequote(,)dnl |
---|
451 | case "${target}" in |
---|
452 | # hpux unix port should go here |
---|
453 | i[3456]86-pc-linux*) # unix "simulator" port |
---|
454 | RTEMS_HOST=Linux |
---|
455 | ;; |
---|
456 | i[3456]86-*freebsd2*) # unix "simulator" port |
---|
457 | RTEMS_HOST=FreeBSD |
---|
458 | ;; |
---|
459 | sparc-sun-solaris*) # unix "simulator" port |
---|
460 | RTEMS_HOST=Solaris |
---|
461 | ;; |
---|
462 | *) |
---|
463 | ;; |
---|
464 | esac |
---|
465 | changequote([,])dnl |
---|
466 | AC_SUBST(RTEMS_HOST) |
---|
467 | ])dnl |
---|
468 | |
---|
469 | dnl |
---|
470 | dnl $Id$ |
---|
471 | dnl |
---|
472 | |
---|
473 | AC_DEFUN(RTEMS_PROJECT_ROOT, |
---|
474 | [dnl |
---|
475 | AC_REQUIRE([RTEMS_TOP]) |
---|
476 | if test "$TARGET_SUBDIR" = "." ; then |
---|
477 | PROJECT_ROOT=$RTEMS_TOPdir/'$(top_builddir)'; |
---|
478 | else |
---|
479 | PROJECT_ROOT=../$RTEMS_TOPdir/'$(top_builddir)' |
---|
480 | fi |
---|
481 | AC_SUBST(PROJECT_ROOT) |
---|
482 | |
---|
483 | RTEMS_ROOT=$RTEMS_TOPdir/'$(top_builddir)'/c/$RTEMS_BSP |
---|
484 | AC_SUBST(RTEMS_ROOT) |
---|
485 | |
---|
486 | INSTALL_CHANGE="\$(KSH) \$(PROJECT_ROOT)/tools/build/install-if-change" |
---|
487 | AC_SUBST(INSTALL_CHANGE) |
---|
488 | |
---|
489 | PACKHEX="\$(PROJECT_ROOT)/tools/build/packhex" |
---|
490 | AC_SUBST(PACKHEX) |
---|
491 | ]) |
---|
492 | |
---|
493 | |
---|
494 | dnl |
---|
495 | dnl $Id$ |
---|
496 | dnl |
---|
497 | dnl Check for target gcc |
---|
498 | dnl |
---|
499 | dnl 98/05/20 Ralf Corsepius (corsepiu@faw.uni-ulm.de) |
---|
500 | dnl Completely reworked |
---|
501 | |
---|
502 | AC_DEFUN(RTEMS_PROG_CC, |
---|
503 | [ |
---|
504 | AC_BEFORE([$0], [AC_PROG_CPP])dnl |
---|
505 | AC_BEFORE([$0], [AC_PROG_CC])dnl |
---|
506 | AC_REQUIRE([RTEMS_TOOL_PREFIX])dnl |
---|
507 | |
---|
508 | dnl Only accept gcc and cc |
---|
509 | dnl NOTE: This might be too restrictive for native compilation |
---|
510 | AC_PATH_PROGS(CC_FOR_TARGET, "$program_prefix"gcc "$program_prefix"cc ) |
---|
511 | test -z "$CC_FOR_TARGET" \ |
---|
512 | && AC_MSG_ERROR([no acceptable cc found in \$PATH]) |
---|
513 | |
---|
514 | dnl backup |
---|
515 | rtems_save_CC=$CC |
---|
516 | rtems_save_CFLAGS=$CFLAGS |
---|
517 | |
---|
518 | dnl temporarily set CC |
---|
519 | CC=$CC_FOR_TARGET |
---|
520 | |
---|
521 | AC_PROG_CC_WORKS |
---|
522 | AC_PROG_CC_GNU |
---|
523 | |
---|
524 | if test $ac_cv_prog_gcc = yes; then |
---|
525 | GCC=yes |
---|
526 | dnl Check whether -g works, even if CFLAGS is set, in case the package |
---|
527 | dnl plays around with CFLAGS (such as to build both debugging and |
---|
528 | dnl normal versions of a library), tasteless as that idea is. |
---|
529 | ac_test_CFLAGS="${CFLAGS+set}" |
---|
530 | ac_save_CFLAGS="$CFLAGS" |
---|
531 | CFLAGS= |
---|
532 | AC_PROG_CC_G |
---|
533 | if test "$ac_test_CFLAGS" = set; then |
---|
534 | CFLAGS="$ac_save_CFLAGS" |
---|
535 | elif test $ac_cv_prog_cc_g = yes; then |
---|
536 | CFLAGS="-g -O2" |
---|
537 | else |
---|
538 | CFLAGS="-O2" |
---|
539 | fi |
---|
540 | else |
---|
541 | GCC= |
---|
542 | test "${CFLAGS+set}" = set || CFLAGS="-g" |
---|
543 | fi |
---|
544 | |
---|
545 | rtems_cv_prog_gcc=$ac_cv_prog_gcc |
---|
546 | rtems_cv_prog_cc_g=$ac_cv_prog_cc_g |
---|
547 | rtems_cv_prog_cc_works=$ac_cv_prog_cc_works |
---|
548 | rtems_cv_prog_cc_cross=$ac_cv_prog_cc_cross |
---|
549 | |
---|
550 | dnl restore initial values |
---|
551 | CC=$rtems_save_CC |
---|
552 | CFLAGS=$rtems_save_CFLAGS |
---|
553 | |
---|
554 | unset ac_cv_prog_gcc |
---|
555 | unset ac_cv_prog_cc_g |
---|
556 | unset ac_cv_prog_cc_works |
---|
557 | unset ac_cv_prog_cc_cross |
---|
558 | ]) |
---|
559 | |
---|
560 | AC_DEFUN(RTEMS_PROG_CC_FOR_TARGET, |
---|
561 | [ |
---|
562 | dnl check target cc |
---|
563 | RTEMS_PROG_CC |
---|
564 | dnl check if the compiler supports --specs |
---|
565 | RTEMS_GCC_SPECS |
---|
566 | dnl check if the target compiler may use --pipe |
---|
567 | RTEMS_GCC_PIPE |
---|
568 | dnl check if the compiler supports --specs if gcc28 is requested |
---|
569 | if test "$RTEMS_USE_GCC272" != "yes" ; then |
---|
570 | if test "$rtems_cv_gcc_specs" = "no"; then |
---|
571 | AC_MSG_WARN([*** disabling --enable-gcc28]) |
---|
572 | RTEMS_USE_GCC272=yes |
---|
573 | fi |
---|
574 | fi |
---|
575 | test "$rtems_cv_gcc_pipe" = "yes" && CC_FOR_TARGET="$CC_FOR_TARGET --pipe" |
---|
576 | |
---|
577 | dnl FIXME: HACK for egcs/cygwin mixing '\\' and '/' in gcc -print-* |
---|
578 | case $host_os in |
---|
579 | *cygwin*) GCCSED="| sed 's%\\\\%/%g'" ;; |
---|
580 | *) ;; |
---|
581 | esac |
---|
582 | AC_SUBST(GCCSED) |
---|
583 | ]) |
---|
584 | |
---|
585 | dnl |
---|
586 | dnl $Id$ |
---|
587 | dnl |
---|
588 | dnl Set program_prefix |
---|
589 | dnl |
---|
590 | dnl 98/05/20 Ralf Corsepius (corsepiu@faw.uni-ulm.de) |
---|
591 | dnl Extracted from configure |
---|
592 | |
---|
593 | AC_DEFUN(RTEMS_TOOL_PREFIX, |
---|
594 | [AC_REQUIRE([AC_CANONICAL_TARGET])dnl |
---|
595 | AC_REQUIRE([AC_CANONICAL_BUILD])dnl |
---|
596 | |
---|
597 | changequote(,)dnl |
---|
598 | if [ "${program_prefix}" = "NONE" ] ; then |
---|
599 | if [ "${target}" = "${host}" ] ; then |
---|
600 | program_prefix= |
---|
601 | else |
---|
602 | program_prefix=${target}- |
---|
603 | fi |
---|
604 | fi |
---|
605 | changequote([,])dnl |
---|
606 | ]) |
---|
607 | |
---|
608 | dnl |
---|
609 | dnl $Id$ |
---|
610 | dnl |
---|
611 | dnl Check whether the target compiler accepts -specs |
---|
612 | dnl |
---|
613 | dnl 98/02/11 Ralf Corsepius corsepiu@faw.uni-ulm.de |
---|
614 | dnl |
---|
615 | |
---|
616 | AC_DEFUN(RTEMS_GCC_SPECS, |
---|
617 | [AC_REQUIRE([RTEMS_PROG_CC]) |
---|
618 | AC_CACHE_CHECK(whether $CC_FOR_TARGET accepts -specs,rtems_cv_gcc_specs, |
---|
619 | [ |
---|
620 | rtems_cv_gcc_specs=no |
---|
621 | if test "$rtems_cv_prog_gcc" = "yes"; then |
---|
622 | touch confspec |
---|
623 | echo 'void f(){}' >conftest.c |
---|
624 | if test -z "`${CC_FOR_TARGET} -specs confspec -c conftest.c 2>&1`";then |
---|
625 | rtems_cv_gcc_specs=yes |
---|
626 | fi |
---|
627 | fi |
---|
628 | rm -f confspec conftest* |
---|
629 | ])]) |
---|
630 | |
---|
631 | dnl |
---|
632 | dnl $Id$ |
---|
633 | dnl |
---|
634 | dnl Check whether the target compiler accepts -pipe |
---|
635 | dnl |
---|
636 | dnl 98/02/11 Ralf Corsepius corsepiu@faw.uni-ulm.de |
---|
637 | dnl |
---|
638 | |
---|
639 | AC_DEFUN(RTEMS_GCC_PIPE, |
---|
640 | [AC_REQUIRE([RTEMS_PROG_CC]) |
---|
641 | AC_REQUIRE([AC_CANONICAL_HOST]) |
---|
642 | AC_CACHE_CHECK(whether $CC_FOR_TARGET accepts --pipe,rtems_cv_gcc_pipe, |
---|
643 | [ |
---|
644 | rtems_cv_gcc_pipe=no |
---|
645 | if test "$rtems_cv_prog_gcc" = "yes"; then |
---|
646 | case "$host_os" in |
---|
647 | cygwin*) |
---|
648 | ;; |
---|
649 | *) |
---|
650 | echo 'void f(){}' >conftest.c |
---|
651 | if test -z "`${CC_FOR_TARGET} --pipe -c conftest.c 2>&1`";then |
---|
652 | rtems_cv_gcc_pipe=yes |
---|
653 | fi |
---|
654 | rm -f conftest* |
---|
655 | ;; |
---|
656 | esac |
---|
657 | fi |
---|
658 | ]) |
---|
659 | ]) |
---|
660 | |
---|
661 | dnl |
---|
662 | dnl $Id$ |
---|
663 | dnl |
---|
664 | dnl Check for target g++ |
---|
665 | dnl |
---|
666 | dnl 98/05/20 Ralf Corsepius (corsepiu@faw.uni-ulm.de) |
---|
667 | dnl Completely reworked |
---|
668 | |
---|
669 | AC_DEFUN(RTEMS_PROG_CXX, |
---|
670 | [ |
---|
671 | AC_BEFORE([$0], [AC_PROG_CXXCPP])dnl |
---|
672 | AC_BEFORE([$0], [AC_PROG_CXX])dnl |
---|
673 | AC_REQUIRE([RTEMS_TOOL_PREFIX])dnl |
---|
674 | |
---|
675 | dnl Only accept g++ and c++ |
---|
676 | dnl NOTE: This might be too restrictive for native compilation |
---|
677 | AC_PATH_PROGS(CXX_FOR_TARGET, "$program_prefix"g++ "$program_prefix"c++) |
---|
678 | test -z "$CXX_FOR_TARGET" \ |
---|
679 | && AC_MSG_ERROR([no acceptable c++ found in \$PATH]) |
---|
680 | |
---|
681 | dnl backup |
---|
682 | rtems_save_CXX=$CXX |
---|
683 | rtems_save_CXXFLAGS=$CXXFLAGS |
---|
684 | |
---|
685 | dnl temporarily set CXX |
---|
686 | CXX=$CXX_FOR_TARGET |
---|
687 | |
---|
688 | AC_PROG_CXX_WORKS |
---|
689 | AC_PROG_CXX_GNU |
---|
690 | |
---|
691 | if test $ac_cv_prog_gxx = yes; then |
---|
692 | GXX=yes |
---|
693 | dnl Check whether -g works, even if CXXFLAGS is set, in case the package |
---|
694 | dnl plays around with CXXFLAGS (such as to build both debugging and |
---|
695 | dnl normal versions of a library), tasteless as that idea is. |
---|
696 | ac_test_CXXFLAGS="${CXXFLAGS+set}" |
---|
697 | ac_save_CXXFLAGS="$CXXFLAGS" |
---|
698 | CXXFLAGS= |
---|
699 | AC_PROG_CXX_G |
---|
700 | if test "$ac_test_CXXFLAGS" = set; then |
---|
701 | CXXFLAGS="$ac_save_CXXFLAGS" |
---|
702 | elif test $ac_cv_prog_cxx_g = yes; then |
---|
703 | CXXFLAGS="-g -O2" |
---|
704 | else |
---|
705 | CXXFLAGS="-O2" |
---|
706 | fi |
---|
707 | else |
---|
708 | GXX= |
---|
709 | test "${CXXFLAGS+set}" = set || CXXFLAGS="-g" |
---|
710 | fi |
---|
711 | |
---|
712 | rtems_cv_prog_gxx=$ac_cv_prog_gxx |
---|
713 | rtems_cv_prog_cxx_g=$ac_cv_prog_cxx_g |
---|
714 | rtems_cv_prog_cxx_works=$ac_cv_prog_cxx_works |
---|
715 | rtems_cv_prog_cxx_cross=$ac_cv_prog_cxx_cross |
---|
716 | |
---|
717 | CXX=$rtems_save_CXX |
---|
718 | CXXFLAGS=$rtems_save_CXXFLAGS |
---|
719 | |
---|
720 | dnl restore initial values |
---|
721 | unset ac_cv_prog_gxx |
---|
722 | unset ac_cv_prog_cc_g |
---|
723 | unset ac_cv_prog_cxx_works |
---|
724 | unset ac_cv_prog_cxx_cross |
---|
725 | ]) |
---|
726 | |
---|
727 | AC_DEFUN(RTEMS_PROG_CXX_FOR_TARGET, |
---|
728 | [ |
---|
729 | RTEMS_PROG_CXX |
---|
730 | if test "$rtems_cv_prog_cc_cross" != "$rtems_cv_prog_cxx_cross"; then |
---|
731 | AC_MSG_ERROR([***] |
---|
732 | [Inconsistency in compiler configuration:] |
---|
733 | [Target C compiler and Target C++ compiler] |
---|
734 | [must both either be cross compilers or native compilers] |
---|
735 | [Hint: If building a posix bsp: LD_LIBRARY_PATH?] ) |
---|
736 | fi |
---|
737 | ]) |
---|
738 | |
---|
739 | dnl |
---|
740 | dnl $Id$ |
---|
741 | dnl |
---|
742 | dnl Set target tools |
---|
743 | dnl |
---|
744 | dnl 98/06/23 Ralf Corsepius (corsepiu@faw.uni-ulm.de) |
---|
745 | dnl fixing cache/environment variable handling |
---|
746 | dnl adding checks for cygwin/egcs '\\'-bug |
---|
747 | dnl adding checks for ranlib/ar -s problem |
---|
748 | dnl |
---|
749 | dnl 98/02/12 Ralf Corsepius (corsepiu@faw.uni-ulm.de) |
---|
750 | dnl |
---|
751 | |
---|
752 | AC_DEFUN(RTEMS_GCC_PRINT, |
---|
753 | [ case $host_os in |
---|
754 | *cygwin*) |
---|
755 | dnl FIXME: Hack for cygwin/egcs reporting mixed '\\' and '/' |
---|
756 | dnl Should be removed once cygwin/egcs reports '/' only |
---|
757 | $1=`$CC_FOR_TARGET --print-prog-name=$2 | sed -e 's%\\\\%/%g' ` |
---|
758 | ;; |
---|
759 | *) |
---|
760 | $1=`$CC_FOR_TARGET --print-prog-name=$2` |
---|
761 | ;; |
---|
762 | esac |
---|
763 | ]) |
---|
764 | |
---|
765 | AC_DEFUN(RTEMS_PATH_TOOL, |
---|
766 | [ |
---|
767 | AC_MSG_CHECKING([target's $2]) |
---|
768 | AC_CACHE_VAL(ac_cv_path_$1,:) |
---|
769 | AC_MSG_RESULT([$ac_cv_path_$1]) |
---|
770 | |
---|
771 | if test -n "$ac_cv_path_$1"; then |
---|
772 | dnl retrieve the value from the cache |
---|
773 | $1=$ac_cv_path_$1 |
---|
774 | else |
---|
775 | dnl the cache was not set |
---|
776 | if test -z "[$]$1" ; then |
---|
777 | if test "$rtems_cv_prog_gcc" = "yes"; then |
---|
778 | # We are using gcc, ask it about its tool |
---|
779 | # NOTE: Necessary if gcc was configured to use the target's |
---|
780 | # native tools or uses prefixes for gnutools (e.g. gas instead of as) |
---|
781 | RTEMS_GCC_PRINT($1,$2) |
---|
782 | fi |
---|
783 | else |
---|
784 | # The user set an environment variable. |
---|
785 | # Check whether it is an absolute path, otherwise AC_PATH_PROG |
---|
786 | # will override the environment variable, which isn't what the user |
---|
787 | # intends |
---|
788 | AC_MSG_CHECKING([whether environment variable $1 is an absolute path]) |
---|
789 | case "[$]$1" in |
---|
790 | /*) # valid |
---|
791 | AC_MSG_RESULT("yes") |
---|
792 | ;; |
---|
793 | *) # invalid for AC_PATH_PROG |
---|
794 | AC_MSG_RESULT("no") |
---|
795 | AC_MSG_ERROR([***] |
---|
796 | [Environment variable $1 should either] |
---|
797 | [be unset (preferred) or contain an absolute path]) |
---|
798 | ;; |
---|
799 | esac |
---|
800 | fi |
---|
801 | |
---|
802 | AC_PATH_PROG($1,"$program_prefix"$2,$3) |
---|
803 | fi |
---|
804 | ]) |
---|
805 | |
---|
806 | AC_DEFUN(RTEMS_CANONICALIZE_TOOLS, |
---|
807 | [AC_REQUIRE([RTEMS_PROG_CC])dnl |
---|
808 | |
---|
809 | dnl FIXME: What shall be done if these tools are not available? |
---|
810 | RTEMS_PATH_TOOL(AR_FOR_TARGET,ar,no) |
---|
811 | RTEMS_PATH_TOOL(AS_FOR_TARGET,as,no) |
---|
812 | RTEMS_PATH_TOOL(LD_FOR_TARGET,ld,no) |
---|
813 | RTEMS_PATH_TOOL(NM_FOR_TARGET,nm,no) |
---|
814 | |
---|
815 | dnl special treatment of ranlib |
---|
816 | RTEMS_PATH_TOOL(RANLIB_FOR_TARGET,ranlib,no) |
---|
817 | if test "$RANLIB_FOR_TARGET" = "no"; then |
---|
818 | # ranlib wasn't found; check if ar -s is available |
---|
819 | RTEMS_AR_FOR_TARGET_S |
---|
820 | if test $rtems_cv_AR_FOR_TARGET_S = "yes" ; then |
---|
821 | dnl override RANLIB_FOR_TARGET's cache |
---|
822 | ac_cv_path_RANLIB_FOR_TARGET="$AR_FOR_TARGET -s" |
---|
823 | RANLIB_FOR_TARGET=$ac_cv_path_RANLIB_FOR_TARGET |
---|
824 | else |
---|
825 | AC_MSG_ERROR([***] |
---|
826 | [Can't figure out how to build a library index] |
---|
827 | [Neither ranlib nor ar -s seem to be available] ) |
---|
828 | fi |
---|
829 | fi |
---|
830 | |
---|
831 | dnl NOTE: These may not be available if not using gnutools |
---|
832 | RTEMS_PATH_TOOL(OBJCOPY_FOR_TARGET,objcopy,no) |
---|
833 | RTEMS_PATH_TOOL(SIZE_FOR_TARGET,size,no) |
---|
834 | RTEMS_PATH_TOOL(STRIP_FOR_TARGET,strip,no) |
---|
835 | ]) |
---|
836 | |
---|
837 | dnl |
---|
838 | dnl $Id$ |
---|
839 | dnl |
---|
840 | |
---|
841 | AC_DEFUN(RTEMS_AR_FOR_TARGET_S, |
---|
842 | [ |
---|
843 | AC_CACHE_CHECK(whether $AR_FOR_TARGET -s works, |
---|
844 | rtems_cv_AR_FOR_TARGET_S, |
---|
845 | [ |
---|
846 | cat > conftest.$ac_ext <<EOF |
---|
847 | int foo( int b ) |
---|
848 | { return b; } |
---|
849 | EOF |
---|
850 | if AC_TRY_COMMAND($CC_FOR_TARGET -o conftest.o -c conftest.$ac_ext) \ |
---|
851 | && AC_TRY_COMMAND($AR_FOR_TARGET -sr conftest.a conftest.o) \ |
---|
852 | && test -s conftest.a ; \ |
---|
853 | then |
---|
854 | rtems_cv_AR_FOR_TARGET_S="yes" |
---|
855 | else |
---|
856 | rtems_cv_AR_FOR_TARGET_S="no" |
---|
857 | fi |
---|
858 | rm -f conftest* |
---|
859 | ]) |
---|
860 | ]) |
---|
861 | |
---|
862 | |
---|
863 | dnl |
---|
864 | dnl $Id$ |
---|
865 | dnl |
---|
866 | |
---|
867 | dnl check for i386 gas supporting 16 bit mode |
---|
868 | dnl - binutils 2.9.1.0.7 and higher |
---|
869 | |
---|
870 | AC_DEFUN(RTEMS_I386_GAS_CODE16, |
---|
871 | [ if test "${target_cpu}" = "i386"; then |
---|
872 | AC_CACHE_CHECK([for 16 bit mode assembler support], |
---|
873 | rtems_cv_prog_gas_code16, |
---|
874 | [cat > conftest.s << EOF |
---|
875 | .code16 |
---|
876 | data32 |
---|
877 | addr32 |
---|
878 | lgdt 0 |
---|
879 | EOF |
---|
880 | if AC_TRY_COMMAND($AS_FOR_TARGET -o conftest.o conftest.s); then |
---|
881 | rtems_cv_prog_gas_code16=yes |
---|
882 | else |
---|
883 | rtems_cv_prog_gas_code16=no |
---|
884 | fi]) |
---|
885 | RTEMS_GAS_CODE16="$rtems_cv_prog_gas_code16" |
---|
886 | fi |
---|
887 | AC_SUBST(RTEMS_GAS_CODE16) |
---|
888 | ]) |
---|
889 | |
---|
890 | |
---|
891 | dnl $Id$ |
---|
892 | |
---|
893 | dnl Report all available bsps for a target, |
---|
894 | dnl check if a bsp-subdirectory is present for all bsps found |
---|
895 | dnl |
---|
896 | dnl RTEMS_CHECK_BSPS(bsp_list) |
---|
897 | AC_DEFUN(RTEMS_CHECK_BSPS, |
---|
898 | [ |
---|
899 | AC_REQUIRE([RTEMS_CHECK_CPU])dnl sets RTEMS_CPU, target |
---|
900 | AC_REQUIRE([RTEMS_TOP])dnl sets RTEMS_TOPdir |
---|
901 | AC_MSG_CHECKING([for bsps]) |
---|
902 | case "${target}" in |
---|
903 | changequote(,)dnl |
---|
904 | i[3456]86-go32-rtems*) |
---|
905 | changequote([,])dnl |
---|
906 | $1="go32 go32_p5" |
---|
907 | ;; |
---|
908 | *) |
---|
909 | files=`ls $srcdir/$RTEMS_TOPdir/c/src/lib/libbsp/$RTEMS_CPU` |
---|
910 | for file in $files; do |
---|
911 | case $file in |
---|
912 | shared*);; |
---|
913 | Makefile*);; |
---|
914 | READ*);; |
---|
915 | CVS*);; |
---|
916 | pxfl*);; |
---|
917 | go32*);; # so the i386 port can pick up the other Makefiles |
---|
918 | # Now account for BSPs with build variants |
---|
919 | gen68360) rtems_bsp="$rtems_bsp gen68360 gen68360_040";; |
---|
920 | p4000) rtems_bsp="$rtems_bsp p4600 p4650";; |
---|
921 | mvme162) rtems_bsp="$rtems_bsp mvme162 mvme162lx";; |
---|
922 | *) $1="[$]$1 $file";; |
---|
923 | esac; |
---|
924 | done |
---|
925 | ;; |
---|
926 | esac |
---|
927 | AC_MSG_RESULT([[$]$1 .. done]) |
---|
928 | ])dnl |
---|
929 | |
---|
930 | AC_DEFUN(RTEMS_CHECK_CUSTOM_BSP, |
---|
931 | [dnl |
---|
932 | AC_MSG_CHECKING([for make/custom/[$]$1.cfg]) |
---|
933 | if test -r "$srcdir/$RTEMS_TOPdir/make/custom/[$]$1.cfg"; then |
---|
934 | AC_MSG_RESULT([yes]) |
---|
935 | else |
---|
936 | AC_MSG_ERROR([no]) |
---|
937 | fi |
---|
938 | ])dnl |
---|
939 | |
---|
940 | dnl |
---|
941 | dnl $Id$ |
---|
942 | dnl |
---|
943 | |
---|
944 | AC_DEFUN(RTEMS_CHECK_MULTIPROCESSING, |
---|
945 | [dnl |
---|
946 | AC_REQUIRE([RTEMS_TOP])dnl |
---|
947 | AC_REQUIRE([RTEMS_CHECK_CPU])dnl |
---|
948 | AC_CACHE_CHECK([whether BSP supports multiprocessing], |
---|
949 | rtems_cv_HAS_MP, |
---|
950 | [dnl |
---|
951 | if test -d "$srcdir/${RTEMS_TOPdir}/c/src/lib/libbsp/${RTEMS_CPU}/${$1}/shmsupp"; then |
---|
952 | if test "$RTEMS_HAS_MULTIPROCESSING" = "yes"; then |
---|
953 | rtems_cv_HAS_MP="yes" ; |
---|
954 | else |
---|
955 | rtems_cv_HAS_MP="disabled"; |
---|
956 | fi |
---|
957 | else |
---|
958 | rtems_cv_HAS_MP="no"; |
---|
959 | fi]) |
---|
960 | if test "$rtems_cv_HAS_MP" = "yes"; then |
---|
961 | HAS_MP="yes" |
---|
962 | else |
---|
963 | HAS_MP="no" |
---|
964 | fi |
---|
965 | AC_SUBST(HAS_MP) |
---|
966 | ]) |
---|
967 | |
---|
968 | dnl $Id$ |
---|
969 | dnl |
---|
970 | AC_DEFUN(RTEMS_CHECK_RDBG, |
---|
971 | [dnl |
---|
972 | AC_REQUIRE([RTEMS_TOP])dnl |
---|
973 | AC_REQUIRE([RTEMS_CHECK_CPU])dnl |
---|
974 | AC_CACHE_CHECK([whether BSP supports librdbg], |
---|
975 | rtems_cv_HAS_RDBG, |
---|
976 | [ |
---|
977 | if test -d "$srcdir/${RTEMS_TOPdir}/c/src/lib/librdbg/${RTEMS_CPU}/${$1}"; then |
---|
978 | rtems_cv_HAS_RDBG="yes" ; |
---|
979 | else |
---|
980 | rtems_cv_HAS_RDBG="no"; |
---|
981 | fi |
---|
982 | ]) |
---|
983 | HAS_RDBG="$rtems_cv_HAS_RDBG" |
---|
984 | AC_SUBST(HAS_RDBG) |
---|
985 | ]) |
---|
986 | |
---|
987 | dnl $Id$ |
---|
988 | dnl |
---|
989 | AC_DEFUN(RTEMS_CHECK_POSIX_API, |
---|
990 | [dnl |
---|
991 | AC_REQUIRE([RTEMS_CHECK_CPU])dnl |
---|
992 | AC_CACHE_CHECK([whether BSP supports libposix], |
---|
993 | rtems_cv_HAS_POSIX_API, |
---|
994 | [dnl |
---|
995 | case "$RTEMS_CPU" in |
---|
996 | unix*) |
---|
997 | rtems_cv_HAS_POSIX_API="no" |
---|
998 | ;; |
---|
999 | *) |
---|
1000 | if test "${RTEMS_HAS_POSIX_API}" = "yes"; then |
---|
1001 | rtems_cv_HAS_POSIX_API="yes"; |
---|
1002 | else |
---|
1003 | rtems_cv_HAS_POSIX_API="disabled"; |
---|
1004 | fi |
---|
1005 | ;; |
---|
1006 | esac]) |
---|
1007 | if test "$rtems_cv_HAS_POSIX_API" = "yes"; then |
---|
1008 | HAS_POSIX_API="yes"; |
---|
1009 | else |
---|
1010 | HAS_POSIX_API="no"; |
---|
1011 | fi |
---|
1012 | AC_SUBST(HAS_POSIX_API)dnl |
---|
1013 | ]) |
---|
1014 | |
---|
1015 | dnl $Id$ |
---|
1016 | dnl |
---|
1017 | AC_DEFUN(RTEMS_CHECK_CXX, |
---|
1018 | [dnl |
---|
1019 | AC_REQUIRE([RTEMS_CHECK_CPU])dnl |
---|
1020 | AC_REQUIRE([RTEMS_PROG_CXX_FOR_TARGET])dnl |
---|
1021 | AC_CACHE_CHECK([whether to build rtems++], |
---|
1022 | rtems_cv_HAS_CPLUSPLUS, |
---|
1023 | [ if test "$RTEMS_HAS_CPLUSPLUS" = "yes"; then |
---|
1024 | if test -n "$CXX_FOR_TARGET"; then |
---|
1025 | rtems_cv_HAS_CPLUSPLUS="yes" |
---|
1026 | else |
---|
1027 | rtems_cv_HAS_CPLUSPLUS="no" |
---|
1028 | fi |
---|
1029 | else |
---|
1030 | rtems_cv_HAS_CPLUSPLUS="no" |
---|
1031 | fi]) |
---|
1032 | HAS_CPLUSPLUS="$rtems_cv_HAS_CPLUSPLUS"; |
---|
1033 | AC_SUBST(HAS_CPLUSPLUS)dnl |
---|
1034 | ]) |
---|
1035 | |
---|
1036 | dnl $Id$ |
---|
1037 | dnl |
---|
1038 | AC_DEFUN(RTEMS_CHECK_NETWORKING, |
---|
1039 | [dnl |
---|
1040 | AC_REQUIRE([RTEMS_CHECK_CPU])dnl |
---|
1041 | AC_CACHE_CHECK([whether BSP supports networking], |
---|
1042 | rtems_cv_HAS_NETWORKING, |
---|
1043 | [dnl |
---|
1044 | case "$RTEMS_CPU" in |
---|
1045 | unix*) |
---|
1046 | rtems_cv_HAS_NETWORKING="no" |
---|
1047 | ;; |
---|
1048 | *) |
---|
1049 | if test "${RTEMS_HAS_NETWORKING}" = "yes"; then |
---|
1050 | rtems_cv_HAS_NETWORKING="yes"; |
---|
1051 | else |
---|
1052 | rtems_cv_HAS_NETWORKING="disabled"; |
---|
1053 | fi |
---|
1054 | ;; |
---|
1055 | esac]) |
---|
1056 | if test "$rtems_cv_HAS_NETWORKING" = "yes"; then |
---|
1057 | HAS_NETWORKING="yes"; |
---|
1058 | else |
---|
1059 | HAS_NETWORKING="no"; |
---|
1060 | fi |
---|
1061 | AC_SUBST(HAS_NETWORKING)dnl |
---|
1062 | ]) |
---|
1063 | |
---|