source: rtems-schedsim/schedsim/configure.ac @ f7494ad

Last change on this file since f7494ad was f7494ad, checked in by Joel Sherrill <joel.sherrill@…>, on 05/17/11 at 19:31:26

2011-05-17 Joel Sherrill <joel.sherrill@…>

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