1 | dnl Process this file with autoconf to produce a configure script. |
---|
2 | dnl |
---|
3 | dnl $Id$ |
---|
4 | |
---|
5 | AC_PREREQ(2.13) |
---|
6 | AC_INIT(optman) |
---|
7 | RTEMS_TOP(../../../..) |
---|
8 | AC_CONFIG_AUX_DIR(../../../..) |
---|
9 | |
---|
10 | RTEMS_CANONICAL_TARGET_CPU |
---|
11 | |
---|
12 | AM_INIT_AUTOMAKE(rtems-c-src-exec-posix,$RTEMS_VERSION,no) |
---|
13 | AM_MAINTAINER_MODE |
---|
14 | |
---|
15 | RTEMS_ENABLE_MULTIPROCESSING |
---|
16 | RTEMS_ENABLE_POSIX |
---|
17 | RTEMS_ENABLE_INLINES |
---|
18 | |
---|
19 | RTEMS_ENV_RTEMSBSP |
---|
20 | |
---|
21 | RTEMS_CHECK_CPU |
---|
22 | RTEMS_CANONICAL_HOST |
---|
23 | |
---|
24 | RTEMS_PROJECT_ROOT |
---|
25 | |
---|
26 | ## FIXME: needed for INSTALL_CHANGE in autoconf subdirectories |
---|
27 | RTEMS_PATH_KSH |
---|
28 | |
---|
29 | dnl check target cc |
---|
30 | RTEMS_PROG_CC_FOR_TARGET |
---|
31 | RTEMS_CANONICALIZE_TOOLS |
---|
32 | |
---|
33 | # Check if there is custom/*.cfg for this BSP |
---|
34 | RTEMS_CHECK_CUSTOM_BSP(RTEMS_BSP) |
---|
35 | RTEMS_CHECK_MULTIPROCESSING(RTEMS_BSP) |
---|
36 | RTEMS_CHECK_POSIX_API(RTEMS_BSP) |
---|
37 | |
---|
38 | # If RTEMS macros are enabled, then use them. Otherwise, use inlines. |
---|
39 | if test "$RTEMS_USE_MACROS" = "yes"; then |
---|
40 | INLINEdir="macros" |
---|
41 | if test "$HAS_POSIX_API" = "yes"; then |
---|
42 | # The problem is that there is currently no code in posix/macros :) |
---|
43 | AC_MSG_ERROR(Macros are not implemented for the POSIX API) |
---|
44 | fi |
---|
45 | else |
---|
46 | INLINEdir="inline" |
---|
47 | fi |
---|
48 | AM_CONDITIONAL(INLINE,test "$INLINEdir" = "inline" ) |
---|
49 | AM_CONDITIONAL(MACROS,test "$INLINEdir" = "macros" ) |
---|
50 | |
---|
51 | ## Needed when using automake for libs/rels |
---|
52 | RTEMS_CHECK_NEWLIB |
---|
53 | |
---|
54 | ## Refuse to build if bsp does not support libposix |
---|
55 | if test "$HAS_POSIX_API" != "yes"; then |
---|
56 | AC_MSG_ERROR([BSP $RTEMS_BSP does not support libposix]) |
---|
57 | fi |
---|
58 | |
---|
59 | # If RTEMS macros are enabled, then use them. Otherwise, refuse to build |
---|
60 | if test "$RTEMS_USE_MACROS" = "yes"; then |
---|
61 | # The problem is that there is currently no code in posix/macros :) |
---|
62 | AC_MSG_ERROR(Macros are not implemented for the POSIX API) |
---|
63 | fi |
---|
64 | |
---|
65 | PROJECT_INCLUDE="\$(PROJECT_ROOT)/$RTEMS_BSP/lib/include" |
---|
66 | AC_SUBST(PROJECT_INCLUDE) |
---|
67 | |
---|
68 | ## |
---|
69 | ## FIXME: We configure and build the macros subdirectory, too. |
---|
70 | ## Should probably use AM_CONDITIONALs to disable them in future |
---|
71 | # Try to explicitly list a Makefile here |
---|
72 | AC_OUTPUT( |
---|
73 | Makefile |
---|
74 | src/Makefile |
---|
75 | include/Makefile |
---|
76 | include/sys/Makefile |
---|
77 | include/rtems/Makefile |
---|
78 | include/rtems/posix/Makefile |
---|
79 | optman/Makefile |
---|
80 | inline/Makefile |
---|
81 | inline/rtems/Makefile |
---|
82 | inline/rtems/posix/Makefile |
---|
83 | macros/Makefile |
---|
84 | macros/rtems/Makefile |
---|
85 | macros/rtems/posix/Makefile |
---|
86 | ) |
---|