[66387986] | 1 | ## Process this file with autoconf to produce a configure script. |
---|
[eb299afc] | 2 | |
---|
[0f77281] | 3 | AC_PREREQ([2.69]) |
---|
[12072880] | 4 | AC_INIT([rtems-cpukit],[_RTEMS_VERSION],[https://devel.rtems.org/newticket]) |
---|
[66387986] | 5 | AC_CONFIG_SRCDIR([score]) |
---|
[2f4c86f] | 6 | RTEMS_TOP([..],[]) |
---|
[eb299afc] | 7 | |
---|
| 8 | RTEMS_CANONICAL_TARGET_CPU |
---|
| 9 | |
---|
[bb2b825] | 10 | AM_INIT_AUTOMAKE([no-define nostdinc subdir-objects foreign 1.12.2]) |
---|
[eb299afc] | 11 | AM_MAINTAINER_MODE |
---|
[04e6f7bf] | 12 | |
---|
| 13 | RTEMS_ENABLE_MULTILIB |
---|
[eb299afc] | 14 | RTEMS_ENABLE_MULTIPROCESSING |
---|
| 15 | RTEMS_ENABLE_POSIX |
---|
[9a4eca5] | 16 | RTEMS_ENABLE_CXX |
---|
[39607984] | 17 | RTEMS_ENABLE_RTEMS_DEBUG |
---|
[3e39b47] | 18 | RTEMS_ENABLE_NETWORKING |
---|
[6ffaeb28] | 19 | RTEMS_ENABLE_PARAVIRT |
---|
[eafb040] | 20 | RTEMS_ENABLE_PROFILING |
---|
[e7fade3] | 21 | RTEMS_ENABLE_DRVMGR |
---|
[eb299afc] | 22 | |
---|
[04e6f7bf] | 23 | RTEMS_ENV_RTEMSCPU |
---|
[39607984] | 24 | RTEMS_CHECK_RTEMS_DEBUG |
---|
[eb299afc] | 25 | |
---|
[1772a04] | 26 | AC_DEFUN([RTEMS_TOOL_CHAIN_ERROR],AC_MSG_ERROR([please update your tool chain via the RSB <https://docs.rtems.org/branches/master/rsb/quick-start.html>])) |
---|
| 27 | |
---|
[5b2e199] | 28 | # Is this a supported CPU? |
---|
| 29 | AC_MSG_CHECKING([if cpu $RTEMS_CPU is supported]) |
---|
| 30 | if test -d "$srcdir/score/cpu/$RTEMS_CPU"; then |
---|
| 31 | AC_MSG_RESULT(yes) |
---|
| 32 | else |
---|
| 33 | AC_MSG_ERROR(no) |
---|
| 34 | fi |
---|
| 35 | |
---|
[955c499d] | 36 | RTEMS_PROG_CC_FOR_TARGET |
---|
[9a4eca5] | 37 | RTEMS_PROG_CXX_FOR_TARGET |
---|
[e7d110ba] | 38 | AM_PROG_CC_C_O |
---|
[9a4eca5] | 39 | RTEMS_CANONICALIZE_TOOLS |
---|
| 40 | RTEMS_PROG_CCAS |
---|
[e73e576] | 41 | AC_PROG_RANLIB |
---|
[eb299afc] | 42 | |
---|
| 43 | RTEMS_CHECK_NEWLIB |
---|
| 44 | |
---|
[b422de6c] | 45 | # BSD-isms, used throughout the sources |
---|
| 46 | # Not really used by this configure script |
---|
| 47 | # FIXME: They should be eliminated if possible. |
---|
[85956f9] | 48 | AC_CHECK_FUNCS([strsep strcasecmp snprintf]) |
---|
[31903f07] | 49 | AC_CHECK_FUNCS([strdup strndup strncasecmp]) |
---|
[b422de6c] | 50 | AC_CHECK_FUNCS([bcopy bcmp]) |
---|
| 51 | AC_CHECK_FUNCS([isascii fileno]) |
---|
[f31a078] | 52 | |
---|
[e83a477] | 53 | # <FIXME> |
---|
| 54 | # Check for functions supplied by newlib >= 1.17.0 |
---|
| 55 | # Newlib's posix/ directory |
---|
[f154804] | 56 | AC_CHECK_FUNCS([readdir_r isatty]) |
---|
[0111c50] | 57 | AC_CHECK_FUNCS([creat \ |
---|
[f154804] | 58 | opendir closedir readdir rewinddir scandir seekdir \ |
---|
| 59 | sleep \ |
---|
| 60 | telldir \ |
---|
| 61 | usleep],, |
---|
[1772a04] | 62 | [RTEMS_TOOL_CHAIN_ERROR]) |
---|
[d020f6f] | 63 | AC_CHECK_FUNCS([__assert]) |
---|
[e83a477] | 64 | AC_CHECK_FUNCS([execl execlp execle execv execvp execve]) |
---|
| 65 | AC_CHECK_FUNCS([regcomp regexec regerror regfree]) |
---|
[8682da39] | 66 | |
---|
| 67 | # Mandated by POSIX, decls not present in some versions of newlib |
---|
[2c0450cb] | 68 | AC_CHECK_DECLS([flockfile],[AC_CHECK_FUNCS([flockfile])],,[#include <stdio.h>]) |
---|
| 69 | AC_CHECK_DECLS([funlockfile],[AC_CHECK_FUNCS([funlockfile])],,[#include <stdio.h>]) |
---|
| 70 | AC_CHECK_DECLS([ftrylockfile],[AC_CHECK_FUNCS([ftrylockfile])],,[#include <stdio.h>]) |
---|
[f4cc6c5] | 71 | |
---|
[b317c391] | 72 | # Newlib proprietary |
---|
| 73 | AC_CHECK_HEADERS([envlock.h]) |
---|
| 74 | AC_CHECK_DECLS([__env_lock],,,[#include <envlock.h>]) |
---|
| 75 | AC_CHECK_DECLS([__env_unlock],,,[#include <envlock.h>]) |
---|
[12f93fbb] | 76 | AC_CHECK_TYPES([struct _Thread_queue_Queue],[],[],[#include <sys/lock.h>]) |
---|
[1772a04] | 77 | AC_CHECK_MEMBER([struct _Thread_queue_Queue._name],[],[RTEMS_TOOL_CHAIN_ERROR],[#include <sys/lock.h>]) |
---|
[b317c391] | 78 | |
---|
[7383b644] | 79 | # Mandated by POSIX, older newlibs bogusly provided CLOCK_PROCESS_CPUTIME+CLOCK_THREAD_CPUTIME |
---|
[1772a04] | 80 | AC_CHECK_DECL([CLOCK_PROCESS_CPUTIME_ID],[],[RTEMS_TOOL_CHAIN_ERROR],[#include <time.h>]) |
---|
| 81 | AC_CHECK_DECL([CLOCK_THREAD_CPUTIME_ID],[],[RTEMS_TOOL_CHAIN_ERROR],[#include <time.h>]) |
---|
[7383b644] | 82 | |
---|
[2f797d0] | 83 | # Mandated by POSIX, decls not present in some versions of newlib, |
---|
| 84 | # some versions stubbed in newlib's rtems crt0 |
---|
| 85 | RTEMS_CHECK_FUNC([seteuid],[#include <unistd.h>]) |
---|
| 86 | RTEMS_CHECK_FUNC([geteuid],[#include <unistd.h>]) |
---|
| 87 | RTEMS_CHECK_FUNC([setegid],[#include <unistd.h>]) |
---|
| 88 | RTEMS_CHECK_FUNC([getegid],[#include <unistd.h>]) |
---|
| 89 | RTEMS_CHECK_FUNC([setuid],[#include <unistd.h>]) |
---|
| 90 | RTEMS_CHECK_FUNC([getuid],[#include <unistd.h>]) |
---|
| 91 | RTEMS_CHECK_FUNC([setgid],[#include <unistd.h>]) |
---|
| 92 | RTEMS_CHECK_FUNC([getgid],[#include <unistd.h>]) |
---|
| 93 | RTEMS_CHECK_FUNC([setsid],[#include <unistd.h>]) |
---|
| 94 | RTEMS_CHECK_FUNC([getsid],[#include <unistd.h>]) |
---|
| 95 | RTEMS_CHECK_FUNC([setpgid],[#include <unistd.h>]) |
---|
| 96 | RTEMS_CHECK_FUNC([getpgid],[#include <unistd.h>]) |
---|
| 97 | RTEMS_CHECK_FUNC([setpgrp],[#include <unistd.h>]) |
---|
| 98 | RTEMS_CHECK_FUNC([getpgrp],[#include <unistd.h>]) |
---|
[8682da39] | 99 | |
---|
[199296db] | 100 | # pthread-functions not declared in some versions of newlib. |
---|
[e76a477] | 101 | RTEMS_CHECK_FUNC([pthread_attr_getguardsize],[#include <pthread.h>]) |
---|
| 102 | RTEMS_CHECK_FUNC([pthread_attr_setguardsize],[#include <pthread.h>]) |
---|
| 103 | RTEMS_CHECK_FUNC([pthread_attr_setstack],[#include <pthread.h>]) |
---|
| 104 | RTEMS_CHECK_FUNC([pthread_attr_getstack],[#include <pthread.h>]) |
---|
[199296db] | 105 | |
---|
[801a1fc6] | 106 | # These are SMP related and were added to newlib by RTEMS. |
---|
[57997d8] | 107 | RTEMS_CHECK_FUNC([pthread_attr_setaffinity_np],[ |
---|
| 108 | #define _GNU_SOURCE |
---|
| 109 | #include <pthread.h>]) |
---|
| 110 | RTEMS_CHECK_FUNC([pthread_attr_getaffinity_np],[ |
---|
| 111 | #define _GNU_SOURCE |
---|
| 112 | #include <pthread.h>]) |
---|
| 113 | RTEMS_CHECK_FUNC([pthread_setaffinity_np],[ |
---|
| 114 | #define _GNU_SOURCE |
---|
| 115 | #include <pthread.h>]) |
---|
| 116 | RTEMS_CHECK_FUNC([pthread_getaffinity_np],[ |
---|
| 117 | #define _GNU_SOURCE |
---|
| 118 | #include <pthread.h>]) |
---|
| 119 | RTEMS_CHECK_FUNC([pthread_getattr_np],[ |
---|
| 120 | #define _GNU_SOURCE |
---|
| 121 | #include <pthread.h>]) |
---|
[801a1fc6] | 122 | |
---|
[5787188] | 123 | # This was added to newlib in August 2014 to improve conformance. |
---|
| 124 | # Disable use of internal definition if it is present. |
---|
| 125 | RTEMS_CHECK_FUNC([sigaltstack],[ |
---|
| 126 | #define _GNU_SOURCE |
---|
| 127 | #include <signal.h>]) |
---|
| 128 | |
---|
[6649644] | 129 | # Mandated by POSIX, not declared in some versions of newlib. |
---|
| 130 | AC_CHECK_DECLS([getrusage],,,[#include sys/resource.h]) |
---|
| 131 | |
---|
[f4cc6c5] | 132 | # Newlib's unix/ directory |
---|
| 133 | AC_CHECK_FUNCS([ttyname getcwd]) |
---|
[e83a477] | 134 | # </FIXME> |
---|
[f4cc6c5] | 135 | |
---|
[36d9f42f] | 136 | # Check if the installed toolchain provides these headers |
---|
| 137 | # and error out if not. |
---|
[dc703190] | 138 | AC_CHECK_HEADERS([errno.h sched.h semaphore.h sys/cdefs.h sys/queue.h tar.h threads.h],, |
---|
[1772a04] | 139 | [RTEMS_TOOL_CHAIN_ERROR]) |
---|
[bffdb82] | 140 | |
---|
[85c429b] | 141 | ## error out if libc doesn't provide stdint.h |
---|
[52a634e9] | 142 | AS_IF([test x"${ac_cv_header_stdint_h}" != xyes], |
---|
[1772a04] | 143 | [RTEMS_TOOL_CHAIN_ERROR]) |
---|
[d62a2e0] | 144 | |
---|
[85c429b] | 145 | ## error out if libc doesn't provide inttypes.h |
---|
[d62a2e0] | 146 | AS_IF([test x"${ac_cv_header_inttypes_h}" != xyes], |
---|
[1772a04] | 147 | [RTEMS_TOOL_CHAIN_ERROR]) |
---|
[ec75ddc] | 148 | |
---|
[17ed18c0] | 149 | AC_HEADER_STDBOOL |
---|
[19b9991] | 150 | AS_IF([test x"${ac_cv_header_stdbool_h}" != xyes], |
---|
[1772a04] | 151 | [RTEMS_TOOL_CHAIN_ERROR]) |
---|
[17ed18c0] | 152 | |
---|
[bfe2fd3] | 153 | AC_CHECK_TYPES([ uint8_t, int8_t]) |
---|
| 154 | AC_CHECK_TYPES([uint16_t, int16_t]) |
---|
| 155 | AC_CHECK_TYPES([uint32_t, int32_t]) |
---|
[7b6d1b5] | 156 | AC_CHECK_TYPES([uint64_t, int64_t]) |
---|
[9a673dba] | 157 | AC_CHECK_TYPES([uintmax_t, intmax_t]) |
---|
| 158 | AC_CHECK_TYPES([uintptr_t, intptr_t]) |
---|
| 159 | |
---|
[72e975e] | 160 | # Some toolchain sanity checks and diagnostics |
---|
| 161 | RTEMS_CHECK_GCC_SANITY |
---|
[161016b] | 162 | |
---|
[9a673dba] | 163 | # These are conditionally defined by the toolchain |
---|
| 164 | # FIXME: we should either conditionally compile those parts in |
---|
| 165 | # RTEMS depending on them, or abort - For now, simply check. |
---|
| 166 | AC_CHECK_HEADER([pthread.h],[ |
---|
| 167 | AC_CHECK_TYPES([pthread_rwlock_t]) |
---|
| 168 | AC_CHECK_TYPES([pthread_barrier_t]) |
---|
| 169 | AC_CHECK_TYPES([pthread_spinlock_t]) |
---|
[1772a04] | 170 | AC_CHECK_TYPES([struct _pthread_cleanup_context],[],[RTEMS_TOOL_CHAIN_ERROR],[#include <pthread.h>]) |
---|
[9a673dba] | 171 | ]) |
---|
[bfe2fd3] | 172 | |
---|
[57e278d] | 173 | AC_CHECK_HEADER([signal.h],[ |
---|
| 174 | AC_CHECK_TYPES([sighandler_t]) |
---|
| 175 | ]) |
---|
| 176 | |
---|
[ac5f2442] | 177 | if test x"$RTEMS_USE_NEWLIB" = xyes ; then |
---|
[1772a04] | 178 | AC_CHECK_DECLS([__getreent],[],[RTEMS_TOOL_CHAIN_ERROR],[#include <sys/reent.h>]) |
---|
[ac5f2442] | 179 | fi |
---|
| 180 | |
---|
[c43981b] | 181 | RTEMS_CHECK_MULTIPROCESSING |
---|
[8d4b5cf] | 182 | RTEMS_CHECK_POSIX_API |
---|
| 183 | RTEMS_CHECK_NETWORKING |
---|
[06dcaf0] | 184 | RTEMS_CHECK_SMP |
---|
[8a9568d2] | 185 | if test "${RTEMS_HAS_SMP}" = "yes"; then |
---|
[1772a04] | 186 | AC_CHECK_HEADERS([stdatomic.h],[],[RTEMS_TOOL_CHAIN_ERROR]) |
---|
[8a9568d2] | 187 | fi |
---|
[91fadb3] | 188 | |
---|
[ea35fdc6] | 189 | rtems_major=`echo _RTEMS_VERSION | sed "s/\..*//"` |
---|
| 190 | rtems_minor=`echo _RTEMS_VERSION | sed "s/[[0-9]][[0-9]]*\.//;s/\..*//"` |
---|
| 191 | rtems_revision=`echo _RTEMS_VERSION | sed "s/[[0-9]][[0-9]]*\.//;s/[[0-9]][[0-9]]*\.//;s/\..*//"` |
---|
| 192 | |
---|
[b4dca71] | 193 | _RTEMS_CPUOPT_INIT |
---|
[3da33bf8] | 194 | |
---|
[926e856a] | 195 | RTEMS_CPUOPT([RTEMS_DEBUG], |
---|
| 196 | [test x"${enable_rtems_debug}" = x"yes"], |
---|
| 197 | [1], |
---|
| 198 | [if RTEMS_DEBUG is enabled]) |
---|
| 199 | |
---|
[3da33bf8] | 200 | RTEMS_CPUOPT([RTEMS_MULTIPROCESSING], |
---|
[28caa1d] | 201 | [test x"$enable_multiprocessing" = xyes], |
---|
[3da33bf8] | 202 | [1], |
---|
| 203 | [if multiprocessing is enabled]) |
---|
| 204 | |
---|
| 205 | RTEMS_CPUOPT([RTEMS_NEWLIB], |
---|
[28caa1d] | 206 | [test x"$RTEMS_USE_NEWLIB" = xyes], |
---|
[3da33bf8] | 207 | [1], |
---|
| 208 | [if using newlib]) |
---|
| 209 | |
---|
| 210 | RTEMS_CPUOPT([RTEMS_POSIX_API], |
---|
[28caa1d] | 211 | [test x"$rtems_cv_HAS_POSIX_API" = xyes], |
---|
[3da33bf8] | 212 | [1], |
---|
| 213 | [if posix api is supported]) |
---|
| 214 | |
---|
[06dcaf0] | 215 | RTEMS_CPUOPT([RTEMS_SMP], |
---|
| 216 | [test x"$RTEMS_HAS_SMP" = xyes], |
---|
| 217 | [1], |
---|
| 218 | [if SMP is enabled]) |
---|
| 219 | |
---|
[6ffaeb28] | 220 | RTEMS_CPUOPT([RTEMS_PARAVIRT], |
---|
| 221 | [test x"$RTEMS_HAS_PARAVIRT" = xyes], |
---|
| 222 | [1], |
---|
| 223 | [PARAVIRT is enabled]) |
---|
| 224 | |
---|
[eafb040] | 225 | RTEMS_CPUOPT([RTEMS_PROFILING], |
---|
| 226 | [test x"$RTEMS_HAS_PROFILING" = xyes], |
---|
| 227 | [1], |
---|
| 228 | [if profiling is enabled]) |
---|
| 229 | |
---|
[28caa1d] | 230 | RTEMS_CPUOPT([RTEMS_NETWORKING], |
---|
| 231 | [test x"$rtems_cv_HAS_NETWORKING" = xyes], |
---|
| 232 | [1], |
---|
| 233 | [if networking is enabled]) |
---|
| 234 | |
---|
[e7fade3] | 235 | RTEMS_CPUOPT([RTEMS_DRVMGR_STARTUP], |
---|
| 236 | [test x"$enable_drvmgr" = xyes], |
---|
| 237 | [1], |
---|
| 238 | [if driver manager api is supported]) |
---|
| 239 | |
---|
[3da33bf8] | 240 | RTEMS_CPUOPT([RTEMS_VERSION], |
---|
| 241 | [true], |
---|
[1bcbe41] | 242 | ["]_RTEMS_VERSION["], |
---|
[3da33bf8] | 243 | [RTEMS version string]) |
---|
| 244 | |
---|
[5787188] | 245 | ## Header file differences that need to be known in .h after install |
---|
| 246 | RTEMS_CPUOPT([__RTEMS_HAVE_DECL_SIGALTSTACK__], |
---|
| 247 | [test x"${ac_cv_have_decl_sigaltstack}" = x"yes"], |
---|
| 248 | [1], |
---|
| 249 | [indicate if <signal.h> in toolset has sigaltstack()]) |
---|
| 250 | |
---|
[e2ba62d1] | 251 | ## This improves both the size and coverage analysis. |
---|
[5603b5a6] | 252 | RTEMS_CPUOPT([__RTEMS_DO_NOT_INLINE_THREAD_ENABLE_DISPATCH__], |
---|
| 253 | [test x"${RTEMS_DO_NOT_INLINE_THREAD_ENABLE_DISPATCH}" = x"1"], |
---|
| 254 | [1], |
---|
[b4dca71] | 255 | [disable inlining _Thread_Enable_dispatch]) |
---|
[5603b5a6] | 256 | |
---|
[7f5a245d] | 257 | ## Deactivate ada bindings |
---|
| 258 | RTEMS_CPUOPT([__RTEMS_ADA__], |
---|
| 259 | [test x"${enable_ada}" = x"yes"], |
---|
| 260 | [1], |
---|
| 261 | [Define to 1 if ada/gnat bindings are built-in]) |
---|
| 262 | |
---|
[263ab4b] | 263 | ## Then we propagate a private copy of the value into cpuopts.h |
---|
| 264 | ## so it is always available to the RTEMS header files. |
---|
| 265 | |
---|
[ea35fdc6] | 266 | RTEMS_CPUOPT([__RTEMS_MAJOR__], |
---|
| 267 | [true], |
---|
| 268 | [$rtems_major], |
---|
| 269 | [major version portion of an RTEMS release]) |
---|
| 270 | |
---|
| 271 | RTEMS_CPUOPT([__RTEMS_MINOR__], |
---|
| 272 | [true], |
---|
| 273 | [$rtems_minor], |
---|
| 274 | [minor version portion of an RTEMS release]) |
---|
| 275 | |
---|
| 276 | RTEMS_CPUOPT([__RTEMS_REVISION__], |
---|
| 277 | [true], |
---|
| 278 | [$rtems_revision], |
---|
| 279 | [revision version portion of an RTEMS release]) |
---|
| 280 | |
---|
[b4dca71] | 281 | _RTEMS_CPUOPT_FINI |
---|
[3da33bf8] | 282 | |
---|
[8217c40] | 283 | AC_ENABLE_MULTILIB([Makefile],[..]) |
---|
| 284 | |
---|
[e30210ea] | 285 | # libmisc/shell/* wants to assign file descriptors to stdio file descriptors. |
---|
| 286 | AC_MSG_CHECKING([for assignable stdio]) |
---|
| 287 | AC_COMPILE_IFELSE( |
---|
| 288 | [AC_LANG_PROGRAM( |
---|
[ae5fe7e6] | 289 | [#include <stdio.h>], |
---|
[e30210ea] | 290 | [stdin = fopen("/tmp", "r")])], |
---|
| 291 | [HAVE_ASSIGNABLE_STDIO=yes], |
---|
| 292 | [HAVE_ASSIGNABLE_STDIO=no]) |
---|
| 293 | AC_MSG_RESULT([$HAVE_ASSIGNABLE_STDIO]) |
---|
| 294 | |
---|
| 295 | # libmisc/serdbg exploits weak symbols |
---|
[d71ab7fd] | 296 | RTEMS_CHECK_GCC_WEAK |
---|
[f7952533] | 297 | |
---|
[07da959] | 298 | # FIXME: These checks are only in here to provide |
---|
| 299 | # configuration-time diagnostics and are not really used. |
---|
| 300 | AC_CHECK_DECLS([_POSIX_LOGIN_NAME_MAX],,,[#include <limits.h>]) |
---|
| 301 | AC_CHECK_DECLS([CHAR_BIT],,,[#include <limits.h>]) |
---|
[21d9736] | 302 | |
---|
| 303 | # FIXME: We should get rid of this. |
---|
| 304 | # So far, only used in libfs/src/nfsclient/src/dirutils.c |
---|
| 305 | AC_CHECK_SIZEOF([mode_t]) |
---|
| 306 | AC_CHECK_SIZEOF([off_t]) |
---|
| 307 | |
---|
[ad9eaf26] | 308 | # FIXME: We should get rid of this. It's a cludge. |
---|
| 309 | AC_CHECK_SIZEOF([time_t]) |
---|
| 310 | |
---|
[91404de] | 311 | AC_CHECK_SIZEOF([size_t]) |
---|
| 312 | |
---|
[ae5fe7e6] | 313 | # FIXME: Mandatory in SUSv4, optional in SUSv3. |
---|
[da0475f] | 314 | # Not implemented in GCC/newlib, so far. |
---|
| 315 | AC_CHECK_DECLS([WORD_BIT],,,[#include <limits.h>]) |
---|
| 316 | AC_CHECK_DECLS([LONG_BIT],,,[#include <limits.h>]) |
---|
[07da959] | 317 | |
---|
| 318 | ## BSD-ism, excluded from POSIX, but available on most platforms |
---|
| 319 | AC_CHECK_DECLS([sbrk],,,[#include <unistd.h>]) |
---|
[396b80e] | 320 | AC_CHECK_DECLS([rcmd],,,[#include <unistd.h>]) |
---|
[07da959] | 321 | |
---|
| 322 | ## Check if libc provides BSD's strlcpy/strlcat |
---|
| 323 | AC_CHECK_FUNCS(strlcpy strlcat) |
---|
| 324 | |
---|
[74bfa2e4] | 325 | ## Check if libc provides decl of utime |
---|
| 326 | ## FIXME: utime has been deprecated in SUSv4. |
---|
| 327 | ## and is likely to be removed in future versions. |
---|
| 328 | ## FIXME (BUG in newlib): SUSv4 saids including <utime.h> should be sufficient. |
---|
| 329 | AC_CHECK_DECLS([utime],,,[#include <sys/types.h> |
---|
| 330 | #include <utime.h>]) |
---|
| 331 | ## Check if libc provides decl of utimes |
---|
| 332 | AC_CHECK_DECLS([utimes],,,[#include <sys/time.h>]) |
---|
| 333 | |
---|
[07da959] | 334 | # ... far too many conditionals ... |
---|
[f9f51d0] | 335 | AM_CONDITIONAL(LIBRPC,[test x"$rtems_cv_HAS_NETWORKING" = x"yes"]) |
---|
[07da959] | 336 | AM_CONDITIONAL(NEWLIB,test x"$RTEMS_USE_NEWLIB" = x"yes") |
---|
[b422de6c] | 337 | |
---|
[1bcbe41] | 338 | AM_CONDITIONAL(HAS_MP,test x"$enable_multiprocessing" = x"yes" ) |
---|
[06dcaf0] | 339 | AM_CONDITIONAL(HAS_SMP,[test "$RTEMS_HAS_SMP" = "yes"]) |
---|
[b422de6c] | 340 | |
---|
[2d80c75] | 341 | AM_CONDITIONAL(HAS_PTHREADS,test x"$rtems_cv_HAS_POSIX_API" = x"yes") |
---|
[6e46fa73] | 342 | AM_CONDITIONAL(LIBNETWORKING,test x"$rtems_cv_HAS_NETWORKING" = x"yes") |
---|
[b422de6c] | 343 | |
---|
[720633c] | 344 | AM_CONDITIONAL([LIBSHELL],[test x"$HAVE_ASSIGNABLE_STDIO" = x"yes"]) |
---|
[e30210ea] | 345 | AM_CONDITIONAL([LIBSERDBG],[test x"$rtems_cv_cc_attribute_weak" = x"yes"]) |
---|
[5cad5bf] | 346 | AM_CONDITIONAL([LIBGNAT],[test x"$rtems_cv_HAS_POSIX_API" = x"yes" \ |
---|
| 347 | && test x"$enable_ada" = x"yes"]) |
---|
[e30210ea] | 348 | |
---|
[91404de] | 349 | AM_CONDITIONAL([LIBUTF8PROC],[test $ac_cv_sizeof_size_t -gt 2]) |
---|
| 350 | |
---|
[9f62936] | 351 | AM_CONDITIONAL([LIBDOSFS],[dnl |
---|
[720633c] | 352 | test x"$ac_cv_type_uint8_t" = xyes \ |
---|
[9f62936] | 353 | && test x"$ac_cv_type_uint16_t" = xyes]) |
---|
| 354 | |
---|
[3da33bf8] | 355 | AC_CONFIG_HEADER(config.h) |
---|
| 356 | |
---|
[58d38a0] | 357 | ## These are needed by the NFS Client |
---|
| 358 | AC_CHECK_PROG(RPCGEN,rpcgen,rpcgen) |
---|
| 359 | AM_CONDITIONAL([RPCTOOLS],[test "$RPCGEN" = rpcgen \ |
---|
| 360 | && test -n "$AWK" \ |
---|
| 361 | && test "$enable_rpcgen" = yes]) |
---|
| 362 | |
---|
[ae5fe7e6] | 363 | # Filter dynamic loading to only build for architectures that have |
---|
| 364 | # reloc backends |
---|
| 365 | AC_MSG_CHECKING([whether CPU supports libdl]) |
---|
| 366 | case $RTEMS_CPU in |
---|
[f5201df] | 367 | arm | i386 | m68k | mips | moxie | powerpc | sparc) |
---|
[ae5fe7e6] | 368 | HAVE_LIBDL=yes ;; |
---|
[9bef63e] | 369 | # bfin has an issue to resolve with libdl. See ticket #2252 |
---|
| 370 | bfin) |
---|
| 371 | HAVE_LIBDL=no ;; |
---|
[a726ca64] | 372 | # lm32 has an issue to resolve with libdl. See ticket #2283 |
---|
| 373 | lm32) |
---|
| 374 | HAVE_LIBDL=no ;; |
---|
[1d061ee] | 375 | # v850 has an issue to resolve with libdl. See ticket #2260 |
---|
| 376 | v850) |
---|
| 377 | HAVE_LIBDL=no ;; |
---|
[ae5fe7e6] | 378 | *) |
---|
| 379 | HAVE_LIBDL=no ;; |
---|
| 380 | esac |
---|
| 381 | AM_CONDITIONAL(LIBDL,[test x"$HAVE_LIBDL" = x"yes"]) |
---|
| 382 | AC_MSG_RESULT([$HAVE_LIBDL]) |
---|
| 383 | |
---|
[a0d4e99] | 384 | # Filter debugger to only build for architectures that have a target backend |
---|
| 385 | AC_MSG_CHECKING([whether CPU supports libdebugger]) |
---|
| 386 | case $RTEMS_CPU in |
---|
| 387 | arm | i386) |
---|
| 388 | HAVE_LIBDEBUGGER=yes ;; |
---|
| 389 | *) |
---|
| 390 | HAVE_LIBDEBUGGER=no ;; |
---|
| 391 | esac |
---|
| 392 | AM_CONDITIONAL(LIBDEBUGGER,[test x"$HAVE_LIBDEBUGGER" = x"yes"]) |
---|
| 393 | AC_MSG_RESULT([$HAVE_LIBDEBUGGER]) |
---|
| 394 | |
---|
[77510c7] | 395 | AC_MSG_CHECKING([whether CPU supports SHA]) |
---|
| 396 | case $RTEMS_CPU in |
---|
| 397 | m32c) |
---|
| 398 | HAVE_SHA=no ;; |
---|
| 399 | *) |
---|
| 400 | HAVE_SHA=yes ;; |
---|
| 401 | esac |
---|
| 402 | AM_CONDITIONAL(SHA,[test x"$HAVE_SHA" = x"yes"]) |
---|
| 403 | AC_MSG_RESULT([$HAVE_SHA]) |
---|
| 404 | |
---|
[a31845f7] | 405 | # Filter libpci to only build for architectures that have support for it |
---|
| 406 | AC_MSG_CHECKING([whether CPU supports libpci]) |
---|
| 407 | case $RTEMS_CPU in |
---|
| 408 | sparc) |
---|
| 409 | HAVE_LIBPCI=yes ;; |
---|
| 410 | *) |
---|
| 411 | HAVE_LIBPCI=no ;; |
---|
| 412 | esac |
---|
| 413 | AM_CONDITIONAL(LIBPCI,[test x"$HAVE_LIBPCI" = x"yes"]) |
---|
| 414 | AC_MSG_RESULT([$HAVE_LIBPCI]) |
---|
| 415 | |
---|
[4f09060] | 416 | # Filter libdrvmgr to only build for architectures that have support for it |
---|
| 417 | AC_MSG_CHECKING([whether CPU supports libdrvmgr]) |
---|
| 418 | case $RTEMS_CPU in |
---|
| 419 | sparc) |
---|
| 420 | HAVE_LIBDRVMGR=yes ;; |
---|
| 421 | *) |
---|
| 422 | HAVE_LIBDRVMGR=no ;; |
---|
| 423 | esac |
---|
| 424 | AM_CONDITIONAL(LIBDRVMGR,[test x"$HAVE_LIBDRVMGR" = x"yes"]) |
---|
| 425 | AC_MSG_RESULT([$HAVE_LIBDRVMGR]) |
---|
| 426 | |
---|
| 427 | |
---|
[ada8d531] | 428 | RTEMS_AMPOLISH3 |
---|
| 429 | |
---|
[70810dc] | 430 | # Explicitly list all Makefiles here |
---|
[b422de6c] | 431 | AC_CONFIG_FILES([ |
---|
[5060d4f] | 432 | Doxyfile |
---|
[b422de6c] | 433 | Makefile |
---|
[b6f21886] | 434 | dev/Makefile |
---|
[175263e] | 435 | dtc/libfdt/Makefile |
---|
[1896a650] | 436 | rtems/Makefile |
---|
| 437 | sapi/Makefile |
---|
[eb299afc] | 438 | score/Makefile |
---|
| 439 | score/cpu/Makefile |
---|
[e9d90764] | 440 | score/cpu/arm/Makefile |
---|
[b78d94d] | 441 | score/cpu/bfin/Makefile |
---|
[66a5000d] | 442 | score/cpu/epiphany/Makefile |
---|
[e9d90764] | 443 | score/cpu/i386/Makefile |
---|
[15e44fd] | 444 | score/cpu/lm32/Makefile |
---|
[e9d90764] | 445 | score/cpu/m68k/Makefile |
---|
[0c34b176] | 446 | score/cpu/m32c/Makefile |
---|
[e9d90764] | 447 | score/cpu/mips/Makefile |
---|
[48fc25f] | 448 | score/cpu/moxie/Makefile |
---|
[7a28ac8] | 449 | score/cpu/nios2/Makefile |
---|
[94d45f6] | 450 | score/cpu/or1k/Makefile |
---|
[e9d90764] | 451 | score/cpu/powerpc/Makefile |
---|
| 452 | score/cpu/sh/Makefile |
---|
| 453 | score/cpu/sparc/Makefile |
---|
[ecbbd968] | 454 | score/cpu/sparc64/Makefile |
---|
[2d7ae960] | 455 | score/cpu/v850/Makefile |
---|
[6b400fed] | 456 | score/cpu/no_cpu/Makefile |
---|
[b422de6c] | 457 | posix/Makefile |
---|
| 458 | libblock/Makefile |
---|
[e7fade3] | 459 | libdrvmgr/Makefile |
---|
[b422de6c] | 460 | libfs/Makefile |
---|
[58d38a0] | 461 | libfs/src/nfsclient/Makefile |
---|
[db27544] | 462 | libgnat/Makefile |
---|
[4466321] | 463 | libcrypt/Makefile |
---|
[07da959] | 464 | libcsupport/Makefile |
---|
[b422de6c] | 465 | libnetworking/Makefile |
---|
[a31845f7] | 466 | libpci/Makefile |
---|
[da0fc5d] | 467 | librpc/Makefile |
---|
[b422de6c] | 468 | libmisc/Makefile |
---|
[6339f467] | 469 | libi2c/Makefile |
---|
[a70b07b] | 470 | libmd/Makefile |
---|
[ae5fe7e6] | 471 | libdl/Makefile |
---|
[cff773f] | 472 | libstdthreads/Makefile |
---|
[a0d4e99] | 473 | libdebugger/Makefile |
---|
[fa645f6] | 474 | zlib/Makefile |
---|
[f26145b] | 475 | ftpd/Makefile |
---|
[8280caa4] | 476 | telnetd/Makefile |
---|
[c5bb2a4e] | 477 | pppd/Makefile |
---|
[ba955609] | 478 | mghttpd/Makefile |
---|
[28caa1d] | 479 | wrapup/Makefile]) |
---|
| 480 | |
---|
| 481 | AC_CONFIG_COMMANDS([preinstall-stamp], |
---|
| 482 | [test -z "$with_multisubdir" && ${MAKE} preinstall-stamp], |
---|
| 483 | [MAKE=${MAKE} |
---|
| 484 | with_multisubdir="$with_multisubdir"]) |
---|
[92ed8c2] | 485 | |
---|
[66387986] | 486 | AC_OUTPUT |
---|