1 | ## Process this file with autoconf to produce a configure script. |
---|
2 | |
---|
3 | AC_PREREQ([2.68]) |
---|
4 | AC_INIT([rtems-tools-schedsim],[_RTEMS_VERSION],[http://www.rtems.org/bugzilla]) |
---|
5 | AC_CONFIG_SRCDIR([rtems]) |
---|
6 | RTEMS_TOP(..) |
---|
7 | |
---|
8 | RTEMS_CANONICAL_TARGET_CPU |
---|
9 | |
---|
10 | AM_INIT_AUTOMAKE([no-define foreign 1.11.1]) |
---|
11 | AM_MAINTAINER_MODE |
---|
12 | |
---|
13 | RTEMS_ENABLE_MULTIPROCESSING |
---|
14 | RTEMS_ENABLE_POSIX |
---|
15 | RTEMS_ENABLE_RTEMS_DEBUG |
---|
16 | RTEMS_ENABLE_NETWORKING |
---|
17 | |
---|
18 | AC_PROG_RANLIB |
---|
19 | # FIXME: Hack to enforce gnu99 on systems with GCC which do not default to gnu99 |
---|
20 | AC_PROG_CC_C99 |
---|
21 | AC_PROG_CXX |
---|
22 | # FIXME: Should abort if c99 or c++ are not available. |
---|
23 | # FIXME: Should abort on systems without GCC. |
---|
24 | |
---|
25 | # FIXME: This package is not a tool, it's a separate, hacked up RTEMS port |
---|
26 | RTEMS_TOOLPATHS |
---|
27 | |
---|
28 | RTEMS_ENABLE_RTEMSDIR |
---|
29 | if test X"${rtems_srcdir}" = "X" ; then |
---|
30 | AC_MSG_ERROR([RTEMS Source Directory Not Specified]) |
---|
31 | fi |
---|
32 | if test ! -d ${rtems_srcdir}; then |
---|
33 | AC_MSG_ERROR([RTEMS Source Directory ${rtems_srcdir} Does Not Exist]) |
---|
34 | fi |
---|
35 | if test ! -d ${rtems_srcdir}/cpukit; then |
---|
36 | AC_MSG_ERROR([RTEMS Source Directory ${rtems_srcdir}/cpukit Does Not Exist]) |
---|
37 | fi |
---|
38 | |
---|
39 | |
---|
40 | RTEMS_CHECK_MULTIPROCESSING |
---|
41 | RTEMS_CHECK_POSIX_API |
---|
42 | RTEMS_CHECK_NETWORKING |
---|
43 | RTEMS_CHECK_SMP |
---|
44 | |
---|
45 | rtems_major=`echo _RTEMS_VERSION | sed "s/\..*//"` |
---|
46 | rtems_minor=`echo _RTEMS_VERSION | sed "s/[[0-9]][[0-9]]*\.//;s/\..*//"` |
---|
47 | rtems_revision=`echo _RTEMS_VERSION | sed "s/[[0-9]][[0-9]]*\.//;s/[[0-9]][[0-9]]*\.//;s/\..*//"` |
---|
48 | |
---|
49 | ## This is needed to generate the field offsets of the per CPU |
---|
50 | ## data structure so they can be accessed from assembly code. |
---|
51 | AC_CHECK_SIZEOF([void *]) |
---|
52 | |
---|
53 | _RTEMS_CPUOPT_INIT |
---|
54 | |
---|
55 | RTEMS_CPUOPT([RTEMS_DEBUG], |
---|
56 | [test x"${enable_rtems_debug}" = x"yes"], |
---|
57 | [1], |
---|
58 | [if RTEMS_DEBUG is enabled]) |
---|
59 | |
---|
60 | RTEMS_CPUOPT([RTEMS_MULTIPROCESSING], |
---|
61 | [test x"$enable_multiprocessing" = xyes], |
---|
62 | [1], |
---|
63 | [if multiprocessing is enabled]) |
---|
64 | |
---|
65 | RTEMS_CPUOPT([RTEMS_NEWLIB], |
---|
66 | [test x"$RTEMS_USE_NEWLIB" = xyes], |
---|
67 | [1], |
---|
68 | [if using newlib]) |
---|
69 | |
---|
70 | RTEMS_CPUOPT([RTEMS_POSIX_API], |
---|
71 | [test x"$rtems_cv_HAS_POSIX_API" = xyes], |
---|
72 | [1], |
---|
73 | [if posix api is supported]) |
---|
74 | |
---|
75 | RTEMS_CPUOPT([RTEMS_SMP], |
---|
76 | [test x"$RTEMS_HAS_SMP" = xyes], |
---|
77 | [1], |
---|
78 | [if SMP is enabled]) |
---|
79 | |
---|
80 | RTEMS_CPUOPT([__RTEMS_HAVE_SYS_CPUSET_H__], |
---|
81 | [true], |
---|
82 | [1], |
---|
83 | [<sys/cpuset.h> is provided]) |
---|
84 | |
---|
85 | RTEMS_CPUOPT([RTEMS_NETWORKING], |
---|
86 | [test x"$rtems_cv_HAS_NETWORKING" = xyes], |
---|
87 | [1], |
---|
88 | [if networking is enabled]) |
---|
89 | |
---|
90 | RTEMS_CPUOPT([RTEMS_VERSION], |
---|
91 | [true], |
---|
92 | ["]_RTEMS_VERSION["], |
---|
93 | [RTEMS version string]) |
---|
94 | |
---|
95 | RTEMS_CPUOPT([__RTEMS_USE_TICKS_FOR_STATISTICS__], |
---|
96 | [test x"${USE_TICKS_FOR_STATISTICS}" = x"1"], |
---|
97 | [1], |
---|
98 | [disable nanosecond granularity for statistics]) |
---|
99 | |
---|
100 | RTEMS_CPUOPT([__RTEMS_USE_TICKS_CPU_USAGE_STATISTICS__], |
---|
101 | [test x"${USE_TICKS_FOR_CPU_USAGE_STATISTICS}" = x"1"], |
---|
102 | [1], |
---|
103 | [disable nanosecond granularity for cpu usage statistics]) |
---|
104 | |
---|
105 | RTEMS_CPUOPT([__RTEMS_USE_TICKS_RATE_MONOTONIC_STATISTICS__], |
---|
106 | [test x"${USE_TICKS_FOR_RATE_MONOTONIC_STATISTICS}" = x"1"], |
---|
107 | [1], |
---|
108 | [disable nanosecond granularity for period statistics]) |
---|
109 | |
---|
110 | ## This improves both the size and coverage analysis. |
---|
111 | RTEMS_CPUOPT([__RTEMS_DO_NOT_INLINE_THREAD_ENABLE_DISPATCH__], |
---|
112 | [test x"${RTEMS_DO_NOT_INLINE_THREAD_ENABLE_DISPATCH}" = x"1"], |
---|
113 | [1], |
---|
114 | [disable inlining _Thread_Enable_dispatch]) |
---|
115 | |
---|
116 | ## This improves both the size and coverage analysis. |
---|
117 | RTEMS_CPUOPT([__RTEMS_DO_NOT_INLINE_CORE_MUTEX_SEIZE__], |
---|
118 | [test x"${RTEMS_DO_NOT_INLINE_CORE_MUTEX_SEIZE}" = x"1"], |
---|
119 | [1], |
---|
120 | [disable inlining _Thread_Enable_dispatch]) |
---|
121 | |
---|
122 | ## This improves both the size and coverage analysis. |
---|
123 | RTEMS_CPUOPT([__RTEMS_DO_NOT_UNROLL_THREADQ_ENQUEUE_PRIORITY__], |
---|
124 | [test x"${RTEMS_DO_NOT_UNROLL_THREADQ_ENQUEUE_PRIORITY}" = x"1"], |
---|
125 | [1], |
---|
126 | [disable inlining _Thread_queue_Enqueue_priority]) |
---|
127 | |
---|
128 | ## This gives the same behavior as 4.8 and older |
---|
129 | RTEMS_CPUOPT([__RTEMS_STRICT_ORDER_MUTEX__], |
---|
130 | [test x"${ENABLE_STRICT_ORDER_MUTEX}" = x"1"], |
---|
131 | [1], |
---|
132 | [disable strict order mutex]) |
---|
133 | |
---|
134 | ## Deactivate ada bindings |
---|
135 | RTEMS_CPUOPT([__RTEMS_ADA__], |
---|
136 | [test x"${enable_ada}" = x"yes"], |
---|
137 | [1], |
---|
138 | [Define to 1 if ada/gnat bindings are built-in]) |
---|
139 | |
---|
140 | RTEMS_CPUOPT([RTEMS_SCHEDSIM], |
---|
141 | [true], |
---|
142 | [1], |
---|
143 | [defined to indicate building RTEMS Scheduler Simulator]) |
---|
144 | |
---|
145 | ## Then we propagate a private copy of the value into cpuopts.h |
---|
146 | ## so it is always available to the RTEMS header files. |
---|
147 | |
---|
148 | RTEMS_CPUOPT([__RTEMS_SIZEOF_VOID_P__], |
---|
149 | [true], |
---|
150 | [$ac_cv_sizeof_void_p], |
---|
151 | [Size of a void * pointer]) |
---|
152 | |
---|
153 | RTEMS_CPUOPT([__RTEMS_MAJOR__], |
---|
154 | [true], |
---|
155 | [$rtems_major], |
---|
156 | [major version portion of an RTEMS release]) |
---|
157 | |
---|
158 | RTEMS_CPUOPT([__RTEMS_MINOR__], |
---|
159 | [true], |
---|
160 | [$rtems_minor], |
---|
161 | [minor version portion of an RTEMS release]) |
---|
162 | |
---|
163 | RTEMS_CPUOPT([__RTEMS_REVISION__], |
---|
164 | [true], |
---|
165 | [$rtems_revision], |
---|
166 | [revision version portion of an RTEMS release]) |
---|
167 | |
---|
168 | _RTEMS_CPUOPT_FINI |
---|
169 | |
---|
170 | AM_CONDITIONAL(LIBRPC,[test x"$rtems_cv_HAS_NETWORKING" = x"yes"]) |
---|
171 | AM_CONDITIONAL(NEWLIB,test x"$RTEMS_USE_NEWLIB" = x"yes") |
---|
172 | |
---|
173 | AM_CONDITIONAL(HAS_MP,test x"$enable_multiprocessing" = x"yes" ) |
---|
174 | AM_CONDITIONAL(HAS_SMP,[test "$RTEMS_HAS_SMP" = "yes"]) |
---|
175 | |
---|
176 | AM_CONDITIONAL(HAS_PTHREADS,test x"$rtems_cv_HAS_POSIX_API" = x"yes") |
---|
177 | AM_CONDITIONAL(LIBNETWORKING,test x"$rtems_cv_HAS_NETWORKING" = x"yes") |
---|
178 | |
---|
179 | AC_SUBST(rtems_srcdir) |
---|
180 | AC_SUBST(program_prefix) |
---|
181 | |
---|
182 | AC_CONFIG_HEADER(config.h) |
---|
183 | |
---|
184 | # Explicitly list all Makefiles here |
---|
185 | AC_CONFIG_FILES([ |
---|
186 | Makefile |
---|
187 | rtems/Makefile |
---|
188 | shell/Makefile |
---|
189 | shell/shared/Makefile |
---|
190 | shell/schedsim_priority/Makefile |
---|
191 | shell/schedsim_simple/Makefile |
---|
192 | shell/schedsim_smpsimple/Makefile |
---|
193 | shell/schedsim_smppriority/Makefile |
---|
194 | shell/schedsim_smppriority_affinity/Makefile |
---|
195 | ]) |
---|
196 | AC_OUTPUT |
---|