diff options
-rw-r--r-- | cpukit/libcsupport/ChangeLog | 7 | ||||
-rw-r--r-- | cpukit/libcsupport/Makefile.am | 6 | ||||
-rw-r--r-- | 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,5 +1,12 @@ 2002-11-18 Ralf Corsepius <corsepiu@faw.uni-ulm.de> + * 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 <corsepiu@faw.uni-ulm.de> + * configure.ac: Remove -ansi -fasm. Add checks to diagnose potential system header conflicts. * Makefile.am: Unconditionally install sys/cdefs.h. 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 <limits.h>]) +],[ +## 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 <limits.h>]) +AC_CHECK_DECLS([CHAR_BIT],,,[#include <limits.h>]) + +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 |