From 1bcbe4100cdbde09ce3f3f8511d9c5fe05a5fe81 Mon Sep 17 00:00:00 2001 From: Ralf Corsepius Date: Thu, 27 Nov 2003 14:36:23 +0000 Subject: 2003-11-27 Ralf Corsepius * configure.ac: Use here-documents to generate cpuopts.tmp. Various fixes and changes to argument processing. Reflect changes to librpc Makefile.ams. * acinclude.m4: Use here-documents to generate cpuopts.tmp. * aclocal/check-itron.m4: Remove HAS_IRON_API. * aclocal/check-multiprocessing.m4: Remove HAS_MP. * aclocal/check-posix.m4: Remove HAS_POSIX_API. --- cpukit/ChangeLog | 10 ++++++++++ cpukit/acinclude.m4 | 19 ++++++++++++++----- cpukit/aclocal/check-itron.m4 | 14 -------------- cpukit/aclocal/check-multiprocessing.m4 | 12 ------------ cpukit/aclocal/check-posix.m4 | 13 ------------- cpukit/configure.ac | 31 ++++++++++++------------------- 6 files changed, 36 insertions(+), 63 deletions(-) (limited to 'cpukit') diff --git a/cpukit/ChangeLog b/cpukit/ChangeLog index 74aba2910a..5fe14ae59c 100644 --- a/cpukit/ChangeLog +++ b/cpukit/ChangeLog @@ -1,3 +1,13 @@ +2003-11-27 Ralf Corsepius + + * configure.ac: Use here-documents to generate cpuopts.tmp. + Various fixes and changes to argument processing. + Reflect changes to librpc Makefile.ams. + * acinclude.m4: Use here-documents to generate cpuopts.tmp. + * aclocal/check-itron.m4: Remove HAS_IRON_API. + * aclocal/check-multiprocessing.m4: Remove HAS_MP. + * aclocal/check-posix.m4: Remove HAS_POSIX_API. + 2003-11-26 Ralf Corsepius * aclocal/canonicalize-tools.m4, aclocal/check-itron.m4, diff --git a/cpukit/acinclude.m4 b/cpukit/acinclude.m4 index 8cceb11682..fdf2bec89b 100644 --- a/cpukit/acinclude.m4 +++ b/cpukit/acinclude.m4 @@ -2,11 +2,20 @@ AC_DEFUN([RTEMS_CPUOPT], [ - echo >> cpuopts.tmp - echo "/* $4 */" >> cpuopts.tmp if $2; then - echo "#define $1 $3" >> cpuopts.tmp +cat >>cpuopts.tmp <<\_ACEOF + +/* $4 */ +#define $1 $3 +_ACEOF +## FIXME: Duplicate the define to the autoheader +## Sanity check - Should be removed in future + AC_DEFINE([$1],[$3],[$4]) else - echo "/* #undef $1 */" >> cpuopts.tmp - fi +cat >>cpuopts.tmp <<\_ACEOF + +/* $4 */ +/* #undef $1 */ +_ACEOF + fi ]) diff --git a/cpukit/aclocal/check-itron.m4 b/cpukit/aclocal/check-itron.m4 index 75e2134276..88f4013e5e 100644 --- a/cpukit/aclocal/check-itron.m4 +++ b/cpukit/aclocal/check-itron.m4 @@ -20,18 +20,4 @@ AC_CACHE_CHECK([whether CPU supports libitron], fi ;; esac]) -if test "$rtems_cv_HAS_ITRON_API" = "yes"; then - HAS_ITRON_API="yes"; -else - HAS_ITRON_API="no"; -fi -AC_SUBST(HAS_ITRON_API)dnl -]) - -AC_DEFUN([RTEMS_DEFINE_ITRON_API], -[AC_REQUIRE([RTEMS_CHECK_ITRON_API])dnl -if test x"${HAS_ITRON_API}" = x"yes"; -then - AC_DEFINE_UNQUOTED(RTEMS_ITRON_API,1,[if itron api is supported]) -fi ]) diff --git a/cpukit/aclocal/check-multiprocessing.m4 b/cpukit/aclocal/check-multiprocessing.m4 index 19eb48f80c..ca4338b09a 100644 --- a/cpukit/aclocal/check-multiprocessing.m4 +++ b/cpukit/aclocal/check-multiprocessing.m4 @@ -6,16 +6,4 @@ AC_DEFUN([RTEMS_CHECK_MULTIPROCESSING], [dnl AC_REQUIRE([RTEMS_ENV_RTEMSCPU])dnl AC_REQUIRE([RTEMS_ENABLE_MULTIPROCESSING])dnl - -AS_IF([test "$enable_multiprocessing" = "yes"], - [HAS_MP="yes"], - [HAS_MP="no"]) -]) - -AC_DEFUN([RTEMS_DEFINE_MULTIPROCESSING], -[AC_REQUIRE([RTEMS_CHECK_MULTIPROCESSING])dnl -if test x"${HAS_MP}" = x"yes"; -then - AC_DEFINE_UNQUOTED(RTEMS_MULTIPROCESSING,1,[if multiprocessing is enabled]) -fi ]) diff --git a/cpukit/aclocal/check-posix.m4 b/cpukit/aclocal/check-posix.m4 index 9c66a78118..be60c5f74a 100644 --- a/cpukit/aclocal/check-posix.m4 +++ b/cpukit/aclocal/check-posix.m4 @@ -20,17 +20,4 @@ AC_CACHE_CHECK([whether CPU supports libposix], fi ;; esac]) -if test "$rtems_cv_HAS_POSIX_API" = "yes"; then - HAS_POSIX_API="yes"; -else - HAS_POSIX_API="no"; -fi -AC_SUBST(HAS_POSIX_API)dnl -]) - -AC_DEFUN([RTEMS_DEFINE_POSIX_API], -[AC_REQUIRE([RTEMS_CHECK_POSIX_API])dnl -AS_IF( - [test x"${HAS_POSIX_API}" = x"yes"], - [AC_DEFINE_UNQUOTED(RTEMS_POSIX_API,1,[if posix api is supported])]) ]) diff --git a/cpukit/configure.ac b/cpukit/configure.ac index 3dca55664c..b4fe000c76 100644 --- a/cpukit/configure.ac +++ b/cpukit/configure.ac @@ -45,8 +45,6 @@ RTEMS_CHECK_POSIX_API RTEMS_CHECK_ITRON_API RTEMS_CHECK_NETWORKING -AC_DEFINE(RTEMS_VERSION,["][_RTEMS_VERSION]["],[RTEMS version string]) - RTEMS_CPU_SUBDIRS([score/cpu]) AS_IF([test x"$HAS_NETWORKING" = x"yes"],[ @@ -68,10 +66,6 @@ AC_ARG_ENABLE([ada], *) AC_MSG_ERROR([bad value ${enable_ada} for --enable-ada]) ;; esac],[enable_ada=no]) -RTEMS_DEFINE_POSIX_API -RTEMS_DEFINE_ITRON_API -RTEMS_DEFINE_MULTIPROCESSING - # HACK: We should use a feature-based configuration. AS_IF([test x"${RTEMS_CPU}" = x"unix"],[ # HACK: silently accept --enable-unixlib @@ -85,12 +79,12 @@ AC_CHECK_FUNCS([strsep strcasecmp snprintf]) AC_CHECK_FUNCS([bcopy bcmp]) AC_CHECK_FUNCS([isascii fileno]) -cat << EOF > cpuopts.tmp +cat >>cpuopts.tmp <<\_ACEOF /* target cpu dependent options file */ /* automatically generated -- DO NOT EDIT!! */ #ifndef __CPU_OPTIONS_h #define __CPU_OPTIONS_h -EOF +_ACEOF RTEMS_CPUOPT([RTEMS_DEBUG], [test x"${enable_rtems_debug}" = x"yes"], @@ -113,7 +107,7 @@ RTEMS_CPUOPT([RTEMS_MULTILIBS], [using multilib'ed RTEMS]) RTEMS_CPUOPT([RTEMS_MULTIPROCESSING], - [test x"$HAS_MP" = "yes"], + [test x"$enable_multiprocessing" = x"yes"], [1], [if multiprocessing is enabled]) @@ -123,7 +117,7 @@ RTEMS_CPUOPT([RTEMS_NEWLIB], [if using newlib]) RTEMS_CPUOPT([RTEMS_POSIX_API], - [test x"$HAS_POSIX_API" = x"yes"], + [test x"$rtems_cv_HAS_POSIX_API" = x"yes"], [1], [if posix api is supported]) @@ -139,11 +133,13 @@ RTEMS_CPUOPT([RTEMS_UNIXLIB], RTEMS_CPUOPT([RTEMS_VERSION], [true], - [\"]_RTEMS_VERSION[\"], + ["]_RTEMS_VERSION["], [RTEMS version string]) -echo >> cpuopts.tmp -echo "#endif" >> cpuopts.tmp +cat >>cpuopts.tmp <<\_ACEOF + +#endif +_ACEOF AS_MKDIR_P(score/include/rtems/score) AS_IF([test -f score/include/rtems/score/cpuopts.h], @@ -252,10 +248,10 @@ AM_CONDITIONAL(NEWLIB,test x"$RTEMS_USE_NEWLIB" = x"yes") AM_CONDITIONAL(INLINE,test x"$enable_rtems_inlines" = x"yes" ) AM_CONDITIONAL(MACROS,test x"$enable_rtems_inlines" = x"no" ) -AM_CONDITIONAL(HAS_MP,test x"$HAS_MP" = x"yes" ) +AM_CONDITIONAL(HAS_MP,test x"$enable_multiprocessing" = x"yes" ) -AM_CONDITIONAL(HAS_POSIX,test x"$HAS_POSIX_API" = x"yes") -AM_CONDITIONAL(HAS_ITRON,test x"$HAS_ITRON_API" = x"yes") +AM_CONDITIONAL(HAS_POSIX,test x"$rtems_cv_HAS_POSIX_API" = x"yes") +AM_CONDITIONAL(HAS_ITRON,test x"$rtems_cv_HAS_ITRON_API" = x"yes") AM_CONDITIONAL(HAS_NETWORKING,test x"$HAS_NETWORKING" = x"yes") # FIXME: All ports should have a libscorecpu.a - But the powerpc doesn't! @@ -295,9 +291,6 @@ libnetworking/Makefile libnetworking/lib/Makefile libnetworking/libc/Makefile librpc/Makefile -librpc/src/Makefile -librpc/src/xdr/Makefile -librpc/src/rpc/Makefile libmisc/Makefile libmisc/cpuuse/Makefile libmisc/shell/Makefile -- cgit v1.2.3