[d7aecdc] | 1 | ## Process this file with autoconf to produce a configure script. |
---|
| 2 | ## |
---|
| 3 | ## $Id$ |
---|
| 4 | |
---|
| 5 | AC_PREREQ(2.52) |
---|
[47c0220] | 6 | AC_INIT([rtems-cpukit-lib],[_RTEMS_VERSION],[rtems-bugs@OARcorp.com]) |
---|
[c8e972f] | 7 | AC_CONFIG_SRCDIR([src]) |
---|
[705a0701] | 8 | RTEMS_TOP(../..) |
---|
[da8f88a] | 9 | AC_CONFIG_AUX_DIR(../..) |
---|
[d7aecdc] | 10 | |
---|
| 11 | RTEMS_CANONICAL_TARGET_CPU |
---|
[56a1ae36] | 12 | AM_INIT_AUTOMAKE([no-define nostdinc foreign 1.6]) |
---|
[d7aecdc] | 13 | AM_MAINTAINER_MODE |
---|
| 14 | |
---|
[c8e972f] | 15 | RTEMS_ENV_RTEMSCPU |
---|
[d7aecdc] | 16 | |
---|
| 17 | RTEMS_CHECK_CPU |
---|
| 18 | RTEMS_CANONICAL_HOST |
---|
| 19 | |
---|
[f934a9d6] | 20 | RTEMS_PROG_CC_FOR_TARGET |
---|
[d7aecdc] | 21 | RTEMS_CANONICALIZE_TOOLS |
---|
[da8f88a] | 22 | AC_PROG_RANLIB |
---|
[d7aecdc] | 23 | |
---|
| 24 | RTEMS_CHECK_NEWLIB |
---|
[c8e972f] | 25 | RTEMS_CHECK_MULTIPROCESSING |
---|
[d7aecdc] | 26 | |
---|
| 27 | AM_CONDITIONAL(UNIX,test x"$RTEMS_CPU" = x"unix") |
---|
| 28 | AM_CONDITIONAL(NEWLIB,test x"$RTEMS_USE_NEWLIB" = x"yes") |
---|
[6c39eca4] | 29 | |
---|
[f934a9d6] | 30 | AS_IF([test x"$RTEMS_USE_NEWLIB" != x"yes"],[ |
---|
[6c39eca4] | 31 | ## Provide sys/cdefs.h only if the host doesn't. |
---|
| 32 | AC_CHECK_HEADERS([sys/cdefs.h],[NEED_SYS_CDEFS_H=no],[NEED_SYS_CDEFS_H=yes]) |
---|
| 33 | # FIXME: These checks are only in here to provide |
---|
[f934a9d6] | 34 | # configuration-time diagnostics and are not really used. |
---|
| 35 | AC_CHECK_HEADERS([stdint.h inttypes.h]) |
---|
[6c39eca4] | 36 | ],[ |
---|
| 37 | ## Using newlib, we provide sys/cdefs.h |
---|
| 38 | NEED_SYS_CDEFS_H=yes |
---|
[f934a9d6] | 39 | ]) |
---|
[6c39eca4] | 40 | |
---|
| 41 | # FIXME: These checks are only in here to provide |
---|
| 42 | # configuration-time diagnostics and are not really used. |
---|
| 43 | AC_CHECK_DECLS([_POSIX_LOGIN_NAME_MAX],,,[#include <limits.h>]) |
---|
| 44 | AC_CHECK_DECLS([CHAR_BIT],,,[#include <limits.h>]) |
---|
| 45 | |
---|
[c707861] | 46 | AS_IF([test x"${RTEMS_USE_NEWLIB}" = x"yes"],[ |
---|
| 47 | ac_cv_have_decl_XTABS=yes |
---|
| 48 | ac_cv_have_decl_OLCUC=yes |
---|
| 49 | ## SUSV3, but seemingly not available on some platforms (reportedly FreeBSD) |
---|
| 50 | ac_cv_have_decl_ONLRET=yes |
---|
| 51 | ac_cv_have_decl_ONOCR=yes |
---|
| 52 | ac_cv_have_decl_TABDLY=yes |
---|
| 53 | ac_cv_have_decl_OCRNL=yes |
---|
| 54 | ac_cv_have_decl_IUCLC=yes |
---|
| 55 | ## SUSV3-XSI extension |
---|
| 56 | ac_cv_have_decl_ECHOPRT=yes |
---|
| 57 | ]) |
---|
| 58 | |
---|
| 59 | # FIXME: Some cruft to work around portability issues with termios.c |
---|
| 60 | ## Seemingly not covered by any standard. |
---|
| 61 | AC_CHECK_DECLS([XTABS],,,[#include <termios.h>]) |
---|
| 62 | AC_CHECK_DECLS([OLCUC],,,[#include <termios.h>]) |
---|
| 63 | ## SUSV3, but seemingly not available on some platforms (reportedly FreeBSD) |
---|
| 64 | AC_CHECK_DECLS([ONLRET],,,[#include <termios.h>]) |
---|
| 65 | AC_CHECK_DECLS([ONOCR],,,[#include <termios.h>]) |
---|
| 66 | AC_CHECK_DECLS([TABDLY],,,[#include <termios.h>]) |
---|
| 67 | AC_CHECK_DECLS([OCRNL],,,[#include <termios.h>]) |
---|
| 68 | AC_CHECK_DECLS([IUCLC],,,[#include <termios.h>]) |
---|
| 69 | ## SUSV3-XSI extension |
---|
| 70 | AC_CHECK_DECLS([ECHOPRT],,,[#include <termios.h>]) |
---|
| 71 | |
---|
| 72 | ## BSD-ism, excluded from POSIX, but available on most platforms |
---|
| 73 | AC_CHECK_DECLS([sbrk],,,[#include <unistd.h>]) |
---|
| 74 | |
---|
[6c39eca4] | 75 | AM_CONDITIONAL([NEED_SYS_CDEFS_H],[test x"$NEED_SYS_CDEFS_H" = x"yes"]) |
---|
| 76 | |
---|
[9d721178] | 77 | AM_CONFIG_HEADER([src/config.h]) |
---|
[d7aecdc] | 78 | |
---|
| 79 | # Explicitly list all Makefiles here |
---|
[b8ad66c] | 80 | AC_CONFIG_FILES([Makefile]) |
---|
[d7aecdc] | 81 | AC_OUTPUT |
---|