forked from Imagelibrary/rtems
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).
This commit is contained in:
@@ -1,3 +1,11 @@
|
|||||||
|
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).
|
||||||
|
|
||||||
2003-10-21 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
2003-10-21 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
||||||
|
|
||||||
* aclocal/check-posix.m4: Add m4-quotes.
|
* aclocal/check-posix.m4: Add m4-quotes.
|
||||||
|
|||||||
12
cpukit/acinclude.m4
Normal file
12
cpukit/acinclude.m4
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
# RTEMS_CPUOPT(NAME,CONDITION,VALUE,EXPLANATION)
|
||||||
|
|
||||||
|
AC_DEFUN([RTEMS_CPUOPT],
|
||||||
|
[
|
||||||
|
echo >> cpuopts.tmp
|
||||||
|
echo "/* $4 */" >> cpuopts.tmp
|
||||||
|
if $2; then
|
||||||
|
echo "#define $1 $3" >> cpuopts.tmp
|
||||||
|
else
|
||||||
|
echo "/* #undef $1 */" >> cpuopts.tmp
|
||||||
|
fi
|
||||||
|
])
|
||||||
@@ -9,8 +9,7 @@ dnl Therefore autoconf's AC_CANONICAL_TARGET will fail for them
|
|||||||
dnl and we have to fix it for rtems ourselves
|
dnl and we have to fix it for rtems ourselves
|
||||||
|
|
||||||
AC_DEFUN([RTEMS_CANONICAL_TARGET_CPU],
|
AC_DEFUN([RTEMS_CANONICAL_TARGET_CPU],
|
||||||
[
|
[AC_REQUIRE([AC_CANONICAL_HOST])
|
||||||
AC_CANONICAL_HOST
|
|
||||||
AC_MSG_CHECKING(rtems target cpu)
|
AC_MSG_CHECKING(rtems target cpu)
|
||||||
case "${host}" in
|
case "${host}" in
|
||||||
# hpux unix port should go here
|
# hpux unix port should go here
|
||||||
|
|||||||
@@ -10,12 +10,9 @@ AC_HELP_STRING([--enable-rtems-inlines],[enable RTEMS inline functions (default:
|
|||||||
esac],[RTEMS_USE_MACROS=no])
|
esac],[RTEMS_USE_MACROS=no])
|
||||||
AC_SUBST(RTEMS_USE_MACROS)dnl
|
AC_SUBST(RTEMS_USE_MACROS)dnl
|
||||||
|
|
||||||
if test x"${RTEMS_USE_MACROS}" = x"yes";
|
AS_IF([test x"${RTEMS_USE_MACROS}" = x"yes"],[],[
|
||||||
then
|
|
||||||
AC_DEFINE_UNQUOTED(USE_MACROS,1,[if using macros])
|
|
||||||
else
|
|
||||||
AC_DEFINE_UNQUOTED(USE_INLINES,1,[if using inlines])
|
AC_DEFINE_UNQUOTED(USE_INLINES,1,[if using inlines])
|
||||||
fi
|
])
|
||||||
|
|
||||||
|
|
||||||
])
|
])
|
||||||
|
|||||||
@@ -79,16 +79,10 @@ RTEMS_DEFINE_MULTIPROCESSING
|
|||||||
|
|
||||||
# HACK: We should use a feature-based configuration.
|
# HACK: We should use a feature-based configuration.
|
||||||
AS_IF([test x"${RTEMS_CPU}" = x"unix"],[
|
AS_IF([test x"${RTEMS_CPU}" = x"unix"],[
|
||||||
AC_DEFINE_UNQUOTED([RTEMS_UNIX],[1],[to indicate RTEMS unix])
|
|
||||||
# HACK: silently accept --enable-unixlib
|
# HACK: silently accept --enable-unixlib
|
||||||
test -n "${enable_unixlib}" || enable_unixlib="yes"
|
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
|
# BSD-isms, used throughout the sources
|
||||||
# Not really used by this configure script
|
# Not really used by this configure script
|
||||||
# FIXME: They should be eliminated if possible.
|
# 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([bcopy bcmp])
|
||||||
AC_CHECK_FUNCS([isascii fileno])
|
AC_CHECK_FUNCS([isascii fileno])
|
||||||
|
|
||||||
AM_CONFIG_HEADER([score/include/rtems/score/cpuopts-tmp.h],[
|
cat << EOF > cpuopts.tmp
|
||||||
echo "/* target cpu dependent options file */" >$tmp/config.h
|
/* target cpu dependent options file */
|
||||||
echo "/* automatically generated -- DO NOT EDIT!! */" >>$tmp/config.h
|
/* automatically generated -- DO NOT EDIT!! */
|
||||||
echo >>$tmp/config.h
|
#ifndef __CPU_OPTIONS_h
|
||||||
echo "#ifndef __CPU_OPTIONS_h" >>$tmp/config.h
|
#define __CPU_OPTIONS_h
|
||||||
echo "#define __CPU_OPTIONS_h" >>$tmp/config.h
|
EOF
|
||||||
echo >>$tmp/config.h
|
|
||||||
sed -e '/.*PACKAGE.*/d' score/include/rtems/score/cpuopts-tmp.h >> $tmp/config.h
|
RTEMS_CPUOPT([USE_INLINES],
|
||||||
echo >>$tmp/config.h
|
[! test x"${RTEMS_USE_MACROS}" = x"yes"],
|
||||||
echo "#endif" >>$tmp/config.h
|
[1],
|
||||||
AS_IF([cmp -s score/include/rtems/score/cpuopts.h $tmp/config.h 2>/dev/null],
|
[if using inlines])
|
||||||
[AC_MSG_NOTICE([score/include/rtems/score/cpuopts.h is unchanged])
|
|
||||||
rm -f $tmp/config.h],
|
RTEMS_CPUOPT([RTEMS_ITRON_API],
|
||||||
[AC_MSG_NOTICE([creating score/include/rtems/score/cpuopts.h])
|
[test x"$rtems_cv_HAS_ITRON_API" = x"yes"],
|
||||||
rm -f score/include/rtems/score/cpuopts.h
|
[1],
|
||||||
mv $tmp/config.h score/include/rtems/score/cpuopts.h])
|
[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],[..])
|
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.
|
# libmisc/shell/* wants to assign file descriptors to stdio file descriptors.
|
||||||
AC_MSG_CHECKING([for assignable stdio])
|
AC_MSG_CHECKING([for assignable stdio])
|
||||||
AC_COMPILE_IFELSE(
|
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([LIBSHELL],[test x"$HAVE_ASSIGNABLE_STDIO" = x"yes"])
|
||||||
AM_CONDITIONAL([LIBSERDBG],[test x"$rtems_cv_cc_attribute_weak" = x"yes"])
|
AM_CONDITIONAL([LIBSERDBG],[test x"$rtems_cv_cc_attribute_weak" = x"yes"])
|
||||||
|
|
||||||
|
AC_CONFIG_HEADER(config.h)
|
||||||
|
|
||||||
# Explicitly list all Makefiles here
|
# Explicitly list all Makefiles here
|
||||||
AC_CONFIG_FILES([
|
AC_CONFIG_FILES([
|
||||||
Makefile
|
Makefile
|
||||||
|
|||||||
Reference in New Issue
Block a user