source:
rtems/c/src/aclocal/canonical-target-name.m4
@
ab922554
Last change on this file since ab922554 was ab922554, checked in by Ralf Corsepius <ralf.corsepius@…>, on 12/22/08 at 03:58:22 | |
---|---|
|
|
File size: 1.0 KB |
Rev | Line | |
---|---|---|
[867ab080] | 1 | dnl |
2 | dnl $Id$ | |
3 | dnl | |
4 | ||
5 | dnl canonicalize target cpu | |
6 | dnl NOTE: Most rtems targets do not fullfil autoconf's | |
7 | dnl target naming conventions "processor-vendor-os" | |
8 | dnl Therefore autoconf's AC_CANONICAL_TARGET will fail for them | |
9 | dnl and we have to fix it for rtems ourselves | |
10 | ||
[9550125e] | 11 | AC_DEFUN([RTEMS_CANONICAL_TARGET_CPU], |
[867ab080] | 12 | [ |
[69decf3] | 13 | AC_CANONICAL_HOST |
[867ab080] | 14 | AC_MSG_CHECKING(rtems target cpu) |
[69decf3] | 15 | case "${host}" in |
[867ab080] | 16 | # hpux unix port should go here |
17 | i[[34567]]86-*linux*) # unix "simulator" port | |
18 | RTEMS_CPU=unix | |
[69decf3] | 19 | RTEMS_HOST=Linux |
[867ab080] | 20 | ;; |
21 | i[[34567]]86-*freebsd*) # unix "simulator" port | |
22 | RTEMS_CPU=unix | |
[69decf3] | 23 | RTEMS_HOST=FreeBSD |
[867ab080] | 24 | ;; |
25 | i[[34567]]86-pc-cygwin*) # Cygwin is just enough unix like :) | |
26 | RTEMS_CPU=unix | |
[69decf3] | 27 | RTEMS_HOST=Cygwin |
[867ab080] | 28 | ;; |
29 | no_cpu-*rtems*) | |
30 | RTEMS_CPU=no_cpu | |
[69decf3] | 31 | RTEMS_HOST=$host_os |
[867ab080] | 32 | ;; |
33 | sparc-sun-solaris*) # unix "simulator" port | |
34 | RTEMS_CPU=unix | |
[69decf3] | 35 | RTEMS_HOST=Solaris |
[867ab080] | 36 | ;; |
37 | *) | |
[69decf3] | 38 | RTEMS_CPU=`echo $host | sed 's%^\([[^-]]*\)-\(.*\)$%\1%'` |
39 | RTEMS_HOST=$host_os | |
[867ab080] | 40 | ;; |
41 | esac | |
42 | AC_SUBST(RTEMS_CPU) | |
[69decf3] | 43 | AC_SUBST(RTEMS_HOST) |
[867ab080] | 44 | AC_MSG_RESULT($RTEMS_CPU) |
45 | ]) |
Note: See TracBrowser
for help on using the repository browser.