summaryrefslogtreecommitdiffstats
path: root/cpukit/configure.ac
diff options
context:
space:
mode:
authorRalf Corsepius <ralf.corsepius@rtems.org>2003-11-20 07:02:53 +0000
committerRalf Corsepius <ralf.corsepius@rtems.org>2003-11-20 07:02:53 +0000
commit3da33bf8132ee46cb268ae732670bd0c534c3ada (patch)
tree38a6a723888bd117c304c428dc411ca157fc4ff5 /cpukit/configure.ac
parent2003-11-17 Ralf Corsepius <corsepiu@faw.uni-ulm.de> (diff)
downloadrtems-3da33bf8132ee46cb268ae732670bd0c534c3ada.tar.bz2
2003-11-20 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
* acinclude.m4: New. * configure.ac: Don't use AUTOHEADER to generate cpuopts.h. Add local autoheader config.h. * aclocal/canonical-target-name.m4: Require AC_CANONICAL_HOST. * aclocal/enable-inlines.m4: Remove USE_MACROS (Unused).
Diffstat (limited to 'cpukit/configure.ac')
-rw-r--r--cpukit/configure.ac102
1 files changed, 73 insertions, 29 deletions
diff --git a/cpukit/configure.ac b/cpukit/configure.ac
index caa80e4182..68872bb6b8 100644
--- a/cpukit/configure.ac
+++ b/cpukit/configure.ac
@@ -79,16 +79,10 @@ RTEMS_DEFINE_MULTIPROCESSING
# HACK: We should use a feature-based configuration.
AS_IF([test x"${RTEMS_CPU}" = x"unix"],[
- AC_DEFINE_UNQUOTED([RTEMS_UNIX],[1],[to indicate RTEMS unix])
# HACK: silently accept --enable-unixlib
test -n "${enable_unixlib}" || enable_unixlib="yes"
])
-AS_IF([test x"${enable_unixlib}" = x"yes"],
- [AC_DEFINE_UNQUOTED([RTEMS_UNIXLIB],[1],
- [to indicate RTEMS using RTEMS's unixlib])]
-)
-
# BSD-isms, used throughout the sources
# Not really used by this configure script
# FIXME: They should be eliminated if possible.
@@ -96,33 +90,81 @@ AC_CHECK_FUNCS([strsep strcasecmp snprintf])
AC_CHECK_FUNCS([bcopy bcmp])
AC_CHECK_FUNCS([isascii fileno])
-AM_CONFIG_HEADER([score/include/rtems/score/cpuopts-tmp.h],[
-echo "/* target cpu dependent options file */" >$tmp/config.h
-echo "/* automatically generated -- DO NOT EDIT!! */" >>$tmp/config.h
-echo >>$tmp/config.h
-echo "#ifndef __CPU_OPTIONS_h" >>$tmp/config.h
-echo "#define __CPU_OPTIONS_h" >>$tmp/config.h
-echo >>$tmp/config.h
-sed -e '/.*PACKAGE.*/d' score/include/rtems/score/cpuopts-tmp.h >> $tmp/config.h
-echo >>$tmp/config.h
-echo "#endif" >>$tmp/config.h
-AS_IF([cmp -s score/include/rtems/score/cpuopts.h $tmp/config.h 2>/dev/null],
- [AC_MSG_NOTICE([score/include/rtems/score/cpuopts.h is unchanged])
- rm -f $tmp/config.h],
- [AC_MSG_NOTICE([creating score/include/rtems/score/cpuopts.h])
- rm -f score/include/rtems/score/cpuopts.h
- mv $tmp/config.h score/include/rtems/score/cpuopts.h])
+cat << EOF > cpuopts.tmp
+/* target cpu dependent options file */
+/* automatically generated -- DO NOT EDIT!! */
+#ifndef __CPU_OPTIONS_h
+#define __CPU_OPTIONS_h
+EOF
+
+RTEMS_CPUOPT([USE_INLINES],
+ [! test x"${RTEMS_USE_MACROS}" = x"yes"],
+ [1],
+ [if using inlines])
+
+RTEMS_CPUOPT([RTEMS_ITRON_API],
+ [test x"$rtems_cv_HAS_ITRON_API" = x"yes"],
+ [1],
+ [if itron api is supported])
+
+RTEMS_CPUOPT([RTEMS_MULTILIBS],
+ [test x"$RTEMS_MULTILIBS" = x"yes"],
+ [1],
+ [using multilib'ed RTEMS])
+
+RTEMS_CPUOPT([RTEMS_MULTIPROCESSING],
+ [test x"$HAS_MP" = "yes"],
+ [1],
+ [if multiprocessing is enabled])
+
+RTEMS_CPUOPT([RTEMS_NEWLIB],
+ [test x"$RTEMS_USE_NEWLIB" = x"yes"],
+ [1],
+ [if using newlib])
+
+RTEMS_CPUOPT([RTEMS_POSIX_API],
+ [test x"$HAS_POSIX_API" = x"yes"],
+ [1],
+ [if posix api is supported])
+
+RTEMS_CPUOPT([RTEMS_UNIX],
+ [test x"$RTEMS_CPU" = x"unix"],
+ [1],
+ [to indicate RTEMS unix])
+
+RTEMS_CPUOPT([RTEMS_UNIXLIB],
+ [test x"${enable_unixlib}" = x"yes"],
+ [1],
+ [to indicate RTEMS using RTEMS's unixlib])
+
+RTEMS_CPUOPT([RTEMS_VERSION],
+ [true],
+ [\"]_RTEMS_VERSION[\"],
+ [RTEMS version string])
+
+echo >> cpuopts.tmp
+echo "#endif" >> cpuopts.tmp
+
+AS_MKDIR_P(score/include/rtems/score)
+AS_IF([test -f score/include/rtems/score/cpuopts.h],
+[
+ AS_IF([cmp -s score/include/rtems/score/cpuopts.h cpuopts.tmp 2>/dev/null],
+ [
+ AC_MSG_NOTICE([score/include/rtems/score/cpuopts.h is unchanged])
+ rm -f cpuopts.tmp
+ ],[
+ AC_MSG_NOTICE([creating score/include/rtems/score/cpuopts.h])
+ rm -f score/include/rtems/score/cpuopts.h
+ mv cpuopts.tmp score/include/rtems/score/cpuopts.h
+ ])
+],[
+ AC_MSG_NOTICE([creating score/include/rtems/score/cpuopts.h])
+ rm -f score/include/rtems/score/cpuopts.h
+ mv cpuopts.tmp score/include/rtems/score/cpuopts.h
])
AC_ENABLE_MULTILIB([Makefile],[..])
-## HACK: Add a define to cpuopts.h to indicate using multilibs
-## Can be applied to produce compiler errors if using
-## multilib-incompatible settings somewhere else (eg. bspopts.h).
-AS_IF([test x"${enable_multilib}" = x"yes"],[
- AC_DEFINE_UNQUOTED([RTEMS_MULTILIBS],[1],[using multilib'ed RTEMS])
-])
-
# libmisc/shell/* wants to assign file descriptors to stdio file descriptors.
AC_MSG_CHECKING([for assignable stdio])
AC_COMPILE_IFELSE(
@@ -231,6 +273,8 @@ AM_CONDITIONAL([NEED_INTTYPES_H],[test x"$NEED_INTTYPES_H" = x"yes"])
AM_CONDITIONAL([LIBSHELL],[test x"$HAVE_ASSIGNABLE_STDIO" = x"yes"])
AM_CONDITIONAL([LIBSERDBG],[test x"$rtems_cv_cc_attribute_weak" = x"yes"])
+AC_CONFIG_HEADER(config.h)
+
# Explicitly list all Makefiles here
AC_CONFIG_FILES([
Makefile