2003-11-27 Ralf Corsepius <corsepiu@faw.uni-ulm.de>

* 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.
This commit is contained in:
Ralf Corsepius
2003-11-27 14:36:23 +00:00
parent 69a6204cdb
commit 1bcbe4100c
6 changed files with 36 additions and 63 deletions

View File

@@ -1,3 +1,13 @@
2003-11-27 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
* 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 <corsepiu@faw.uni-ulm.de>
* aclocal/canonicalize-tools.m4, aclocal/check-itron.m4,

View File

@@ -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
cat >>cpuopts.tmp <<\_ACEOF
/* $4 */
/* #undef $1 */
_ACEOF
fi
])

View File

@@ -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
])

View File

@@ -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
])

View File

@@ -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])])
])

View File

@@ -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