From 6c39eca47a9af6de451c65dc43242e29434b5b1f Mon Sep 17 00:00:00 2001 From: Ralf Corsepius Date: Mon, 18 Nov 2002 23:53:14 +0000 Subject: 2002-11-18 Ralf Corsepius * configure.ac: Check for sys/cdefs.h, Add NEED_SYS_CDEFS_H. Add check for CHAR_BIT. * Makefile.am: Conditionally install sys/cdefs.h iff using newlib or if the host does not provide sys/cdefs.h (Fixes Linux/posix). --- cpukit/libcsupport/ChangeLog | 7 +++++++ cpukit/libcsupport/Makefile.am | 6 +++++- cpukit/libcsupport/configure.ac | 18 +++++++++++++++--- 3 files changed, 27 insertions(+), 4 deletions(-) diff --git a/cpukit/libcsupport/ChangeLog b/cpukit/libcsupport/ChangeLog index b347565993..e9d24929f4 100644 --- a/cpukit/libcsupport/ChangeLog +++ b/cpukit/libcsupport/ChangeLog @@ -1,3 +1,10 @@ +2002-11-18 Ralf Corsepius + + * configure.ac: Check for sys/cdefs.h, Add NEED_SYS_CDEFS_H. + Add check for CHAR_BIT. + * Makefile.am: Conditionally install sys/cdefs.h iff using newlib or + if the host does not provide sys/cdefs.h (Fixes Linux/posix). + 2002-11-18 Ralf Corsepius * configure.ac: Remove -ansi -fasm. diff --git a/cpukit/libcsupport/Makefile.am b/cpukit/libcsupport/Makefile.am index 177acf542d..e021c220e8 100644 --- a/cpukit/libcsupport/Makefile.am +++ b/cpukit/libcsupport/Makefile.am @@ -60,6 +60,10 @@ if NEWLIB NEWLIB_H_FILES = include/sys/termios.h include/sys/utsname.h endif +if NEED_SYS_CDEFS_H +SYS_H_FILES = include/sys/cdefs.h +endif + # FIXME: We should not install to include/sys unless using newlib. include_sys_HEADERS = \ include/sys/filio.h \ @@ -68,7 +72,7 @@ include/sys/ioctl.h \ include/sys/sockio.h \ include/sys/termios.h \ include/sys/ttycom.h \ -include/sys/cdefs.h \ +$(SYS_H_FILES) \ $(NEWLIB_H_FILES) PREINSTALL_FILES += $(PROJECT_INCLUDE)/sys \ diff --git a/cpukit/libcsupport/configure.ac b/cpukit/libcsupport/configure.ac index 023b7e53bc..5378a3807c 100644 --- a/cpukit/libcsupport/configure.ac +++ b/cpukit/libcsupport/configure.ac @@ -26,13 +26,25 @@ RTEMS_CHECK_MULTIPROCESSING AM_CONDITIONAL(UNIX,test x"$RTEMS_CPU" = x"unix") AM_CONDITIONAL(NEWLIB,test x"$RTEMS_USE_NEWLIB" = x"yes") + AS_IF([test x"$RTEMS_USE_NEWLIB" != x"yes"],[ -# FIXME: Currently, these checks are only in here to provide +## Provide sys/cdefs.h only if the host doesn't. + AC_CHECK_HEADERS([sys/cdefs.h],[NEED_SYS_CDEFS_H=no],[NEED_SYS_CDEFS_H=yes]) +# FIXME: These checks are only in here to provide # configuration-time diagnostics and are not really used. - AC_CHECK_HEADERS([sys/cdefs.h]) AC_CHECK_HEADERS([stdint.h inttypes.h]) - AC_CHECK_DECLS([_POSIX_LOGIN_NAME_MAX],,,[#include ]) +],[ +## Using newlib, we provide sys/cdefs.h + NEED_SYS_CDEFS_H=yes ]) + +# FIXME: These checks are only in here to provide +# configuration-time diagnostics and are not really used. +AC_CHECK_DECLS([_POSIX_LOGIN_NAME_MAX],,,[#include ]) +AC_CHECK_DECLS([CHAR_BIT],,,[#include ]) + +AM_CONDITIONAL([NEED_SYS_CDEFS_H],[test x"$NEED_SYS_CDEFS_H" = x"yes"]) + AM_CONFIG_HEADER(src/config.h) # Explicitly list all Makefiles here -- cgit v1.2.3