1 | ## Process this file with autoconf to produce a configure script. |
---|
2 | ## |
---|
3 | ## $Id$ |
---|
4 | |
---|
5 | AC_PREREQ(2.59) |
---|
6 | AC_INIT([rtems-cpukit-score-cpu-unix],[_RTEMS_VERSION],[rtems-bugs@rtems.com]) |
---|
7 | AC_CONFIG_SRCDIR([cpu.c]) |
---|
8 | RTEMS_TOP([../../..]) |
---|
9 | |
---|
10 | RTEMS_CANONICAL_TARGET_CPU |
---|
11 | |
---|
12 | AM_INIT_AUTOMAKE([no-define nostdinc foreign 1.8.1]) |
---|
13 | AM_MAINTAINER_MODE |
---|
14 | |
---|
15 | RTEMS_ENV_RTEMSCPU |
---|
16 | |
---|
17 | RTEMS_PROG_CC_FOR_TARGET |
---|
18 | RTEMS_CANONICALIZE_TOOLS |
---|
19 | AC_PROG_RANLIB |
---|
20 | |
---|
21 | RTEMS_CHECK_NEWLIB |
---|
22 | RTEMS_CHECK_MULTIPROCESSING |
---|
23 | |
---|
24 | # The only use of System V IPC is the UNIX port when multiprocessing. |
---|
25 | AS_IF([test "$HAS_MP" = "yes"], |
---|
26 | [RTEMS_CHECK_SYSV_UNIX]) |
---|
27 | |
---|
28 | ## The code fragment below had been used in tools/cpu/unix/gensize.c. |
---|
29 | ## FIXME: |
---|
30 | ## * The pad very likely is not necessary. |
---|
31 | AC_CHECK_SIZEOF([CPU_CONTEXT],[],[ |
---|
32 | #include <stdio.h> |
---|
33 | #include <setjmp.h> |
---|
34 | |
---|
35 | typedef struct { |
---|
36 | jmp_buf regs; |
---|
37 | int isr_level; |
---|
38 | int pad[4]; /* just in case */ |
---|
39 | } CPU_CONTEXT; |
---|
40 | ]) |
---|
41 | |
---|
42 | AC_CONFIG_HEADERS([rtems/score/unixsize-tmp.h],[ |
---|
43 | echo "/* automatically generated -- DO NOT EDIT!! */" >$tmp/config.h |
---|
44 | echo >>$tmp/config.h |
---|
45 | echo "#ifndef __rtems_score_unixsize_h" >>$tmp/config.h |
---|
46 | echo "#define __rtems_score_unixsize_h" >>$tmp/config.h |
---|
47 | echo >>$tmp/config.h |
---|
48 | sed -e '/.*PACKAGE.*/d' rtems/score/unixsize-tmp.h >> $tmp/config.h |
---|
49 | echo >>$tmp/config.h |
---|
50 | echo "#endif" >>$tmp/config.h |
---|
51 | AS_IF([cmp -s rtems/score/unixsize.h $tmp/config.h 2>/dev/null], |
---|
52 | [AC_MSG_NOTICE([rtems/score/unixsize.h is unchanged]) |
---|
53 | rm -f $tmp/config.h], |
---|
54 | [AC_MSG_NOTICE([creating rtems/score/unixsize.h]) |
---|
55 | rm -f rtems/score/unixsize.h |
---|
56 | mv $tmp/config.h rtems/score/unixsize.h]) |
---|
57 | ]) |
---|
58 | |
---|
59 | # Explicitly list all Makefiles here |
---|
60 | AC_CONFIG_FILES([Makefile]) |
---|
61 | AC_OUTPUT |
---|