summaryrefslogtreecommitdiffstats
path: root/macros
diff options
context:
space:
mode:
Diffstat (limited to 'macros')
-rw-r--r--macros/enable-rtemsbsp.m49
-rw-r--r--macros/i386-gas-code16.m45
-rw-r--r--macros/multilib.m414
-rw-r--r--macros/prog-cc.m41
-rw-r--r--macros/prog-cxx.m41
-rw-r--r--macros/project-root.m419
-rw-r--r--macros/rtems-top.m430
-rw-r--r--macros/target.m4129
-rw-r--r--macros/tool-prefix.m422
9 files changed, 41 insertions, 189 deletions
diff --git a/macros/enable-rtemsbsp.m4 b/macros/enable-rtemsbsp.m4
index fd31997d3c..a1fb24a335 100644
--- a/macros/enable-rtemsbsp.m4
+++ b/macros/enable-rtemsbsp.m4
@@ -38,8 +38,9 @@ RTEMS_ENABLE_BARE
AC_SUBST(BARE_CPU_MODEL)
AC_SUBST(BARE_CPU_CFLAGS)
-## RTEMS_ROOT=$RTEMS_TOPdir/'$(top_builddir)'/c/$RTEMS_BSP
-## AC_SUBST(RTEMS_ROOT)
+RTEMS_ROOT=$PROJECT_ROOT/c/$RTEMS_BSP
+AC_SUBST(RTEMS_ROOT)
+AM_CONDITIONAL(RTEMS_CONFIG_PER_BSP, test x = x);
])
AC_DEFUN(RTEMS_ENV_RTEMSCPU,
@@ -52,7 +53,7 @@ else
rtems_cv_RTEMS_BSP="multilib"
RTEMS_BSP="$rtems_cv_RTEMS_BSP"
AC_SUBST(RTEMS_BSP)
-## RTEMS_ROOT=$RTEMS_TOPdir/'$(top_builddir)'/c
-## AC_SUBST(RTEMS_ROOT)
+ RTEMS_ROOT=$PROJECT_ROOT/c
+ AC_SUBST(RTEMS_ROOT)
fi
])
diff --git a/macros/i386-gas-code16.m4 b/macros/i386-gas-code16.m4
index 8bfb2a5859..9bb0030d94 100644
--- a/macros/i386-gas-code16.m4
+++ b/macros/i386-gas-code16.m4
@@ -23,6 +23,9 @@ EOF
RTEMS_GAS_CODE16="$rtems_cv_prog_gas_code16"
fi
AC_SUBST(RTEMS_GAS_CODE16)
- AC_DEFINE_UNQUOTED(NEW_GAS,1,[if using 16 bit mode assembler support])
+ if test x"${RTEMS_GAS_CODE16}" = x"yes";
+ then
+ AC_DEFINE_UNQUOTED(NEW_GAS,1,[if using 16 bit mode assembler support])
+ fi
])
diff --git a/macros/multilib.m4 b/macros/multilib.m4
index 1d11561f0a..5e0c5272d1 100644
--- a/macros/multilib.m4
+++ b/macros/multilib.m4
@@ -22,8 +22,6 @@ AC_REQUIRE([RTEMS_ENABLE_MULTILIB])
dnl We may get other options which we don't document:
dnl --with-target-subdir, --with-multisrctop, --with-multisubdir
-test -z "[$]{with_target_subdir}" && with_target_subdir=.
-
if test "[$]{srcdir}" = "."; then
if test "[$]{with_target_subdir}" != "."; then
multilib_basedir="[$]{srcdir}/[$]{with_multisrctop}../ifelse([$2],,,[$2])"
@@ -42,18 +40,18 @@ else
fi
AC_OUTPUT_COMMANDS(
- if test -n "$CONFIG_FILES"; do
- $ac_file" = ifelse([$1],,Makefile,[$1]) \
+ if test -n "$CONFIG_FILES"; then
+ ac_file=[]ifelse([$1],,Makefile,[$1]) \
. ${multilib_basedir}/../config-ml.in
- fi,
+ fi,[
srcdir=${srcdir}
host=${host}
target=${target}
-# with_multisrctop="${with_multisrctop}"
-# with_target_subdir="${with_target_subdir}"
+ with_multisrctop="${with_multisrctop}"
+ with_target_subdir="${with_target_subdir}"
with_multisubdir="${with_multisubdir}"
ac_configure_args="${multilib_arg} ${ac_configure_args}"
CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
multilib_basedir=${multilib_basedir}
- CC="${CC}")
+ CC="${CC}"])
])
diff --git a/macros/prog-cc.m4 b/macros/prog-cc.m4
index f3cf4a70df..81ca5ca75a 100644
--- a/macros/prog-cc.m4
+++ b/macros/prog-cc.m4
@@ -9,7 +9,6 @@ AC_DEFUN(RTEMS_PROG_CC,
AC_BEFORE([$0], [AC_PROG_CPP])dnl
AC_BEFORE([$0], [AC_PROG_CC])dnl
AC_BEFORE([$0], [RTEMS_CANONICALIZE_TOOLS])dnl
-AC_REQUIRE([RTEMS_TOOL_PREFIX])dnl
AC_REQUIRE([RTEMS_ENABLE_LIBCDIR])dnl
AC_REQUIRE([RTEMS_ENABLE_GCC28])dnl
diff --git a/macros/prog-cxx.m4 b/macros/prog-cxx.m4
index 72d3a20957..d9159677b8 100644
--- a/macros/prog-cxx.m4
+++ b/macros/prog-cxx.m4
@@ -8,7 +8,6 @@ AC_DEFUN(RTEMS_PROG_CXX,
[
AC_BEFORE([$0], [AC_PROG_CXXCPP])dnl
AC_BEFORE([$0], [RTEMS_CANONICALIZE_TOOLS])dnl
-AC_REQUIRE([RTEMS_TOOL_PREFIX])dnl
AC_REQUIRE([RTEMS_ENABLE_LIBCDIR])dnl
dnl Only accept g++
diff --git a/macros/project-root.m4 b/macros/project-root.m4
index 35fd15b7aa..1f5fb677f5 100644
--- a/macros/project-root.m4
+++ b/macros/project-root.m4
@@ -15,25 +15,6 @@ dnl
AC_DEFUN(RTEMS_PROJECT_ROOT,
[dnl
AC_REQUIRE([RTEMS_TOP])
-if test "$TARGET_SUBDIR" = "." ; then
-# Native
-PROJECT_TOPdir=${RTEMS_TOPdir}/'$(top_builddir)'
-PROJECT_ROOT=${RTEMS_TOPdir}/'$(top_builddir)';
-else
-# FIXME: Moving the build-tree
-# PROJECT_TOPdir=../${RTEMS_TOPdir}/'$(top_builddir)'
-# PROJECT_ROOT=${RTEMS_TOPdir}/'$(top_builddir)'
-
-# FIXME: Old, per-bsp building style
-PROJECT_TOPdir=../${RTEMS_TOPdir}/'$(top_builddir)'
-PROJECT_ROOT=../${RTEMS_TOPdir}/'$(top_builddir)'
-fi
-AC_SUBST(PROJECT_ROOT)
-AC_SUBST(PROJECT_TOPdir)
-
-# FIXME: This should not be here
-RTEMS_ROOT=$RTEMS_TOPdir/'$(top_builddir)'/c/$RTEMS_BSP
-AC_SUBST(RTEMS_ROOT)
PACKHEX="\$(PROJECT_TOPdir)/tools/build/packhex"
AC_SUBST(PACKHEX)
diff --git a/macros/rtems-top.m4 b/macros/rtems-top.m4
index 26abdf330d..fa79019df7 100644
--- a/macros/rtems-top.m4
+++ b/macros/rtems-top.m4
@@ -15,17 +15,37 @@ AC_BEFORE([$0], [AM_INIT_AUTOMAKE])dnl
ENDIF=endif
AC_SUBST(ENDIF)
-## HACK to destinguish between using GNU and RTEMS canonicalization
-AM_CONDITIONAL(RTEMS_CANONICALIZATION,test "x" = "y")
-
+# with_target_subdir
AC_ARG_WITH(target-subdir,
[ --with-target-subdir=DIR],
-TARGET_SUBDIR="$withval",
-TARGET_SUBDIR=".")
+with_target_subdir="$withval",
+with_target_subdir=".")
RTEMS_TOPdir="$1";
AC_SUBST(RTEMS_TOPdir)
+if test "$with_target_subdir" = "." ; then
+# Native
+PROJECT_TOPdir=${RTEMS_TOPdir}/'$(top_builddir)'
+else
+# Cross
+changequote(, )dnl
+dots=`echo $with_target_subdir|\
+sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
+changequote([, ])dnl
+PROJECT_TOPdir=${dots}${RTEMS_TOPdir}/'$(top_builddir)'
+fi
+AC_SUBST(PROJECT_TOPdir)
+
+if test "$with_target_subdir" = "." ; then
+# Native
+PROJECT_ROOT=${RTEMS_TOPdir}/'$(top_builddir)';
+else
+# Cross
+PROJECT_ROOT=${RTEMS_TOPdir}/'$(top_builddir)'
+fi
+AC_SUBST(PROJECT_ROOT)
+
dnl Determine RTEMS Version string from the VERSION file
dnl Hopefully, Joel never changes its format ;-
AC_MSG_CHECKING([for RTEMS Version])
diff --git a/macros/target.m4 b/macros/target.m4
index e807fd2a39..9c84490880 100644
--- a/macros/target.m4
+++ b/macros/target.m4
@@ -15,7 +15,7 @@ AC_DEFUN(RTEMS_OUTPUT_BUILD_SUBDIRS,
[
if test "$no_recursion" != yes; then
if test $build_alias != $host_alias; then
- target_subdir="$target_alias"
+ target_subdir="$host_alias"
else
target_subdir="."
fi
@@ -119,130 +119,3 @@ changequote([, ])dnl
done
fi
])
-dnl $Id$
-
-AC_DEFUN(RTEMS_CONFIG_SUBDIRS,
-[
-define([RTEMS_TGT_SUBDIRS],
-ifdef([RTEMS_TGT_SUBDIRS], [RTEMS_TGT_SUBDIRS ],)[$1])dnl
-target_subdirs="RTEMS_TGT_SUBDIRS"
-AC_SUBST(target_subdirs)
-])
-
-dnl Derived from automake-1.4's AC_OUTPUT_SUBDIRS
-AC_DEFUN(RTEMS_OUTPUT_SUBDIRS,
-[
-if test "$no_recursion" != yes; then
- if test $target_alias != $host_alias; then
- target_subdir="$target_alias"
- else
- target_subdir="."
- fi
- # Remove --cache-file and --srcdir arguments so they do not pile up.
- ac_sub_configure_args=
- ac_prev=
- for ac_arg in $ac_configure_args; do
- if test -n "$ac_prev"; then
- ac_prev=
- continue
- fi
- case "$ac_arg" in
- -cache-file | --cache-file | --cache-fil | --cache-fi \
- | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
- ac_prev=cache_file ;;
- -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
- | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
- ;;
- -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
- ac_prev=srcdir ;;
- -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
- ;;
- *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;;
- esac
- done
-
- test -d $target_subdir || mkdir $target_subdir
- for ac_config_dir in $1; do
-
- # Do not complain, so a configure script can configure whichever
- # parts of a large source tree are present.
- if test ! -d $srcdir/$ac_config_dir; then
- continue
- fi
-
- echo configuring in $target_subdir/$ac_config_dir
-
- case "$srcdir" in
-## .) ;;
- *)
- if test -d $target_subdir/$ac_config_dir || mkdir $target_subdir/$ac_config_dir; then :;
- else
- AC_MSG_ERROR(can not create `pwd`/$target_subdir/$ac_config_dir)
- fi
- ;;
- esac
-
- ac_popdir=`pwd`
- cd $target_subdir/$ac_config_dir
-
-changequote(, )dnl
- # A "../" for each directory in /$ac_config_dir.
- ac_dots=`echo $target_subdir/$ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
-changequote([, ])dnl
-
- case "$srcdir" in
-## .) # No --srcdir option. We are building in place.
-## ac_sub_srcdir=$srcdir ;;
- /*) # Absolute path.
- ac_sub_srcdir=$srcdir/$ac_config_dir ;;
- *) # Relative path.
- ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;;
- esac
-
- # Check for guested configure; otherwise get Cygnus style configure.
- if test -f $ac_sub_srcdir/configure; then
- ac_sub_configure=$ac_sub_srcdir/configure
- elif test -f $ac_sub_srcdir/configure.in; then
- ac_sub_configure=$ac_configure
- else
- AC_MSG_WARN(no configuration information is in $ac_config_dir)
- ac_sub_configure=
- fi
-
- # The recursion is here.
- if test -n "$ac_sub_configure"; then
-
- # Make the cache file name correct relative to the subdirectory.
- if test "$target_alias" != "$host_alias"; then
- ac_sub_cache_file=$cache_file
- else
- case "$cache_file" in
- /*) ac_sub_cache_file=$cache_file ;;
- *) # Relative path.
- ac_sub_cache_file="$ac_dots$cache_file" ;;
- esac
- fi
-ifdef([AC_PROVIDE_AC_PROG_INSTALL],
- [ case "$ac_given_INSTALL" in
-changequote(, )dnl
- [/$]*) INSTALL="$ac_given_INSTALL" ;;
-changequote([, ])dnl
- *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
- esac
-])dnl
-
- echo "[running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file] --srcdir=$ac_sub_srcdir"
- # The eval makes quoting arguments work.
- if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure \
- $ac_sub_configure_args --srcdir=$ac_sub_srcdir \
- --with-target-subdir=$target_subdir --cache-file=$ac_sub_cache_file
- then :
- else
- AC_MSG_ERROR($ac_sub_configure failed for $ac_config_dir)
- fi
- fi
-
- cd $ac_popdir
- done
-fi
-])
diff --git a/macros/tool-prefix.m4 b/macros/tool-prefix.m4
deleted file mode 100644
index 563cca8e8f..0000000000
--- a/macros/tool-prefix.m4
+++ /dev/null
@@ -1,22 +0,0 @@
-dnl
-dnl $Id$
-dnl
-dnl Set program_prefix
-dnl
-dnl 98/05/20 Ralf Corsepius (corsepiu@faw.uni-ulm.de)
-dnl Extracted from configure
-
-AC_DEFUN(RTEMS_TOOL_PREFIX,
-[AC_REQUIRE([AC_CANONICAL_TARGET])dnl
-AC_REQUIRE([AC_CANONICAL_BUILD])dnl
-
-changequote(,)dnl
-if [ "${program_prefix}" = "NONE" ] ; then
- if [ "${target}" = "${host}" ] ; then
- program_prefix=
- else
- program_prefix=${target}-
- fi
-fi
-changequote([,])dnl
-])