2000-10-30 Ralf Corsepius <corsepiu@faw.uni-ulm.de>

* configure.in: New, Cygnus/GNU style configuration.
	* Makefile.am: Add macros/, reflect new configure.in,
	ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/macros
	* automake/compile.am: BSP_SPECS, remove RTEMS_CANONICALIZATION.
	* automake/lib.am: Remove RTEMS_CANONICALIZATION.
	* macros/tool-prefix.m4: Remove.
	* macros/target.m4: Remove RTEMS_CONFIG_SUBDIRS, RTEMS_OUTPUT_SUBDIRS.
	* macros/enable-rtemsbsp.m4: Add RTEMS_CONFIG_PER_BSP, add setting
	RTEMS_ROOT.
	* macros/i386-gas-code16.m4: Define NEW_GAS only for 16bit mode-
	* macros/multilib.m4: Various minor fixes.
	* macros/project-root.m4: Remove setting PROJECT_TOPdir,
	PROJECT_ROOT, RTEMS_ROOT.
	* macros/rtems-top.m4: Remove RTEMS_CANONICALIZATION, TARGET_SUBDIRS;
	Add with_target_subdirs, PROJECT_TOPdir, PROJECT_ROOT.
This commit is contained in:
Joel Sherrill
2000-10-31 21:20:00 +00:00
parent 846027b9b8
commit 3174a7edae
14 changed files with 340 additions and 262 deletions

View File

@@ -1,3 +1,21 @@
2000-10-30 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
* configure.in: New, Cygnus/GNU style configuration.
* Makefile.am: Add macros/, reflect new configure.in,
ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/macros
* automake/compile.am: BSP_SPECS, remove RTEMS_CANONICALIZATION.
* automake/lib.am: Remove RTEMS_CANONICALIZATION.
* macros/tool-prefix.m4: Remove.
* macros/target.m4: Remove RTEMS_CONFIG_SUBDIRS, RTEMS_OUTPUT_SUBDIRS.
* macros/enable-rtemsbsp.m4: Add RTEMS_CONFIG_PER_BSP, add setting
RTEMS_ROOT.
* macros/i386-gas-code16.m4: Define NEW_GAS only for 16bit mode-
* macros/multilib.m4: Various minor fixes.
* macros/project-root.m4: Remove setting PROJECT_TOPdir,
PROJECT_ROOT, RTEMS_ROOT.
* macros/rtems-top.m4: Remove RTEMS_CANONICALIZATION, TARGET_SUBDIRS;
Add with_target_subdirs, PROJECT_TOPdir, PROJECT_ROOT.
2000-10-27 Ralf Corsepius <corsepiu@faw.uni-ulm.de> 2000-10-27 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
* automake/multilib.am: New file. * automake/multilib.am: New file.

View File

@@ -7,31 +7,29 @@
## ##
AUTOMAKE_OPTIONS = foreign 1.4 AUTOMAKE_OPTIONS = foreign 1.4
ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/macros
SUBDIRS = doc make tools @TARGET_SUBDIRS@ SUBDIRS = doc make tools $(HOST_SUBDIRS) $(TARGET_SUBDIRS)
AUTOMAKE_FILES = automake/compile.am automake/host.am automake/lib.am \ AUTOMAKE_FILES = automake/compile.am automake/host.am automake/lib.am \
automake/local.am automake/multilib.am automake/subdirs.am automake/local.am automake/multilib.am automake/subdirs.am
ACLOCAL_FILES += aclocal/ar-s.m4 aclocal/bsp-alias.m4 \ ACLOCAL_FILES += macros/bsp-alias.m4 macros/canonical-host.m4 \
aclocal/canonical-host.m4 aclocal/canonical-target-name.m4 \ macros/canonical-target-name.m4 macros/canonicalize-tools.m4 \
aclocal/canonicalize-tools.m4 aclocal/check-bsps.m4 \ macros/check-bsp-cache.m4 macros/check-bsps.m4 macros/check-cpu.m4 \
aclocal/check-bsp-cache.m4 aclocal/check-cpu.m4 aclocal/check-cxx.m4 \ macros/check-cxx.m4 macros/check-itron.m4 \
aclocal/check-itron.m4 aclocal/check-multiprocessing.m4 \ macros/check-multiprocessing.m4 macros/check-networking.m4 \
aclocal/check-networking.m4 aclocal/check-newlib.m4 \ macros/check-newlib.m4 macros/check-posix.m4 macros/check-rdbg.m4 \
aclocal/check-posix.m4 aclocal/check-rdbg.m4 aclocal/enable-bare.m4 \ macros/enable-bare.m4 macros/enable-cxx.m4 macros/enable-gcc28.m4 \
aclocal/enable-cxx.m4 aclocal/enable-gcc28.m4 \ macros/enable-inlines.m4 macros/enable-itron.m4 macros/enable-libcdir.m4 \
aclocal/enable-inlines.m4 aclocal/enable-itron.m4 \ macros/enable-multiprocessing.m4 macros/enable-networking.m4 \
aclocal/enable-libcdir.m4 aclocal/enable-multiprocessing.m4 \ macros/enable-posix.m4 macros/enable-rdbg.m4 macros/enable-rtemsbsp.m4 \
aclocal/enable-networking.m4 aclocal/enable-posix.m4 \ macros/enable-tests.m4 macros/gcc-pipe.m4 macros/gcc-specs.m4 \
aclocal/enable-rdbg.m4 aclocal/enable-rtemsbsp.m4 \ macros/i386-gas-code16.m4 macros/multilib.m4 macros/path-ksh.m4 \
aclocal/enable-tests.m4 aclocal/gcc-pipe.m4 aclocal/gcc-specs.m4 \ macros/path-perl.m4 macros/prog-cc.m4 macros/prog-cxx.m4 \
aclocal/i386-gas-code16.m4 aclocal/path-ksh.m4 aclocal/path-perl.m4 \ macros/project-root.m4 macros/rtems-debug.m4 \
aclocal/prog-cc.m4 aclocal/prog-cxx.m4 aclocal/project-root.m4 \ macros/rtems-test-no-pause.m4 macros/rtems-top.m4 macros/sysv-ipc.m4 \
aclocal/rtems-top.m4 aclocal/sysv-ipc.m4 aclocal/target.m4 \ macros/target.m4 macros/tool-paths.m4
aclocal/tool-paths.m4 aclocal/tool-prefix.m4 aclocal/multilib.m4 \
aclocal/rtems-debug.m4 aclocal/rtems-test-no-pause.m4
noinst_SCRIPTS = bootstrap noinst_SCRIPTS = bootstrap

View File

@@ -64,8 +64,11 @@ LINK_LIBS_RTEMS = $(PROJECT_RELEASE)/lib/librtemsall$(LIBSUFFIX_VA)
LINK_LIBS_GCC272 = $(LINK_LIBS_RTEMS) $(LIBC_LIBC) $(LIBC_LIBGCC) LINK_LIBS_GCC272 = $(LINK_LIBS_RTEMS) $(LIBC_LIBC) $(LIBC_LIBGCC)
else else
## gcc >= 2.8.x ## gcc >= 2.8.x
## FIXME: This is BSP-specific and will fail for BSP-independent directories if RTEMS_CONFIG_PER_BSP
GCCSPECS = -B$(PROJECT_RELEASE)/lib/ -specs bsp_specs -qrtems BSP_SPECS = -specs bsp_specs -qrtems
endif
GCCSPECS = -B$(PROJECT_RELEASE)/lib/ $(BSP_SPECS)
endif endif
else else
## fall back to the old style compilers/*.cfg ## fall back to the old style compilers/*.cfg
@@ -273,36 +276,12 @@ RTEMS_CFLAGS__V = $(RTEMS_CFLAGS_OPTIMIZE_V)
## ------------------------------------------------------------------------- ## -------------------------------------------------------------------------
## FIXME: This will probably vanish, when GNU canonicalization will be
## introduced
if RTEMS_CANONICALIZATION
CC = $(CC_FOR_TARGET) $(GCCSPECS)
CXX = $(CXX_FOR_TARGET) $(GCCSPECS)
AR_FOR_TARGET = @AR_FOR_TARGET@
AR = $(AR_FOR_TARGET)
AS_FOR_TARGET = @AS_FOR_TARGET@
AS = $(AS_FOR_TARGET)
RANLIB_FOR_TARGET = @RANLIB_FOR_TARGET@
RANLIB = $(RANLIB_FOR_TARGET)
LD_FOR_TARGET = @LD_FOR_TARGET@
LD = $(LD_FOR_TARGET)
NM_FOR_TARGET = @NM_FOR_TARGET@
NM = $(NM_FOR_TARGET)
OBJCOPY_FOR_TARGET = @OBJCOPY_FOR_TARGET@
OBJCOPY = $(OBJCOPY_FOR_TARGET)
SIZE_FOR_TARGET = @SIZE_FOR_TARGET@
SIZE = $(SIZE_FOR_TARGET)
STRIP_FOR_TARGET = @STRIP_FOR_TARGET@
STRIP = $(STRIP_FOR_TARGET)
else
CC = @CC@ $(GCCSPECS) CC = @CC@ $(GCCSPECS)
CXX = @CXX@ $(GCCSPECS) CXX = @CXX@ $(GCCSPECS)
OBJCOPY = @OBJCOPY@ OBJCOPY = @OBJCOPY@
NM = @NM@ NM = @NM@
SIZE = @SIZE@ SIZE = @SIZE@
STRIP = @STRIP@ STRIP = @STRIP@
endif
## ##
## FIXME: DEFS and INCLUDES should not be passed as AM_CPPFLAGS ## FIXME: DEFS and INCLUDES should not be passed as AM_CPPFLAGS

View File

@@ -2,11 +2,8 @@
## $Id$ ## $Id$
## ##
if RTEMS_CANONICALIZATION
else
AR = @AR@ AR = @AR@
RANLIB = @RANLIB@ RANLIB = @RANLIB@
endif
define make-library define make-library
$(RM) $@ $(RM) $@

View File

@@ -14,13 +14,10 @@ if test -f VERSION; then
[Please use a separate build directory, instead] ) [Please use a separate build directory, instead] )
fi fi
RTEMS_CANONICAL_TARGET_CPU AC_CANONICAL_SYSTEM
AM_INIT_AUTOMAKE(rtems,$RTEMS_VERSION,no) AM_INIT_AUTOMAKE(cross,0,no)
AM_MAINTAINER_MODE AM_MAINTAINER_MODE
dnl RTEMS_ENABLE_BARE
dnl RTEMS_ENABLE_RTEMSBSP(rtems_bsp)
dnl These option are only in here to let --help report all supported dnl These option are only in here to let --help report all supported
dnl options. dnl options.
RTEMS_ENABLE_MULTIPROCESSING RTEMS_ENABLE_MULTIPROCESSING
@@ -35,27 +32,76 @@ RTEMS_ENABLE_LIBCDIR
RTEMS_ENABLE_TESTS RTEMS_ENABLE_TESTS
RTEMS_ENABLE_RTEMS_DEBUG RTEMS_ENABLE_RTEMS_DEBUG
RTEMS_CHECK_CPU # these tools are built for the build environment
RTEMS_CANONICAL_HOST #
build_tools="tools/build tools/update tools/cpu"
AC_CONFIG_SUBDIRS(tools/build) # these libraries are used for the host environment
AC_CONFIG_SUBDIRS(tools/update) #
AC_CONFIG_SUBDIRS(tools/cpu) host_libs=""
# List all subdirectories to be compiled for the target here # these tools are built for the host environment
RTEMS_CONFIG_SUBDIRS(c) #
host_tools=""
# these libraries are built for the target environment, and are built after
# the host libraries and the host tools (which may be a cross compiler)
#
target_libs="c"
# these tools are built using the target libs, and are intended to run only
# in the target environment
#
target_tools=""
## All tools belong in one of the four categories, and are assigned above
## We assign ${configdirs} this way to remove all embedded newlines. This
## is important because configure will choke if they ever get through.
## ${configdirs} is directories we build using the host tools.
## ${target_configdirs} is directories we build using the target tools.
#
configdirs="${host_libs} ${host_tools}"
AC_SUBST(configdirs)
target_configdirs="${target_libs} ${target_tools}"
AC_SUBST(target_configdirs)
# Record target_configdirs and the configure arguments in Makefile.
targargs=`echo "${ac_configure_args}" | \
sed -e 's/--no[^ ]*//' \
-e 's/--cache[a-z-]*=[^ ]*//' \
-e 's/--ho[a-z-]*=[^ ]*//' \
-e 's/--bu[a-z-]*=[^ ]*//' \
-e 's/--ta[a-z-]*=[^ ]*//'`;
targargs="--host=${target_alias} --build=${build_alias} ${targargs}"
AC_SUBST(targargs)
target_subdir=${target_alias}
if test "$target_alias" != "$host_alias"; then
changequote(,)dnl changequote(,)dnl
TARGET_SUBDIRS=`echo "$target_subdirs" | \ if test $target_alias = $host_alias;
sed -e "s%\([a-zA-Z0-9][a-zA-Z0-9]*\)%${target_alias}/\1%g"` then
changequote([,])dnl HOST_SUBDIRS="$configdirs $target_configdirs"
TARGET_SUBDIRS=""
else else
TARGET_SUBDIRS="$target_subdirs" HOST_SUBDIRS="$configdirs"
TARGET_SUBDIRS=`echo "$target_configdirs" | \
sed -e "s%\([^ ]\+\)%$target_alias/\1%g"`
fi fi
AC_SUBST(TARGET_SUBDIRS) changequote([,])dnl
if test $host_alias = $build_alias;
then
HOST_SUBDIRS="$build_tools $HOST_SUBDIRS"
else
build_configdirs="$build_tools"
fi
AC_CONFIG_SUBDIRS($HOST_SUBDIRS)
AC_SUBST(TARGET_SUBDIRS)
AC_SUBST(HOST_SUBDIRS)
# Explicitly list all Makefiles here
AC_OUTPUT( AC_OUTPUT(
Makefile Makefile
tools/Makefile tools/Makefile
@@ -65,4 +111,192 @@ make/Templates/Makefile
make/compilers/Makefile make/compilers/Makefile
doc/Makefile) doc/Makefile)
RTEMS_OUTPUT_SUBDIRS(RTEMS_TGT_SUBDIRS) if test "$no_recursion" != yes; then
if test $target_alias != $host_alias; then
# Remove --srcdir arguments so they do not pile up.
ac_sub_configure_args=
ac_prev=
for ac_arg in $targargs; do
if test -n "$ac_prev"; then
ac_prev=
continue
fi
case "$ac_arg" in
-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 $target_configdirs; 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 configure
if test -f $ac_sub_srcdir/configure; then
ac_sub_configure=$ac_sub_srcdir/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.
ac_sub_cache_file=$cache_file
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 \
--libdir='${exec_prefix}'/$target_alias/lib
then :
else
AC_MSG_ERROR($ac_sub_configure failed for $ac_config_dir)
fi
fi
cd $ac_popdir
done
fi
if test $build_alias != $host_alias; then
# Remove --srcdir arguments so they do not pile up.
ac_sub_configure_args=
ac_prev=
for ac_arg in $targargs; do
if test -n "$ac_prev"; then
ac_prev=
continue
fi
case "$ac_arg" in
-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 $build_configdirs; 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 $ac_config_dir
case "$srcdir" in
.) ;;
*)
if test -d $ac_config_dir || mkdir $ac_config_dir; then :;
else
AC_MSG_ERROR(can not create `pwd`/$ac_config_dir)
fi
;;
esac
ac_popdir=`pwd`
cd $ac_config_dir
changequote(, )dnl
# A "../" for each directory in /$ac_config_dir.
ac_dots=`echo $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
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.
ac_sub_cache_file=$cache_file
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 \
--cache-file=$ac_sub_cache_file \
--build=$build_alias --host=$build_alias
then :
else
AC_MSG_ERROR($ac_sub_configure failed for $ac_config_dir)
fi
fi
cd $ac_popdir
done
fi
fi

View File

@@ -38,8 +38,9 @@ RTEMS_ENABLE_BARE
AC_SUBST(BARE_CPU_MODEL) AC_SUBST(BARE_CPU_MODEL)
AC_SUBST(BARE_CPU_CFLAGS) AC_SUBST(BARE_CPU_CFLAGS)
## RTEMS_ROOT=$RTEMS_TOPdir/'$(top_builddir)'/c/$RTEMS_BSP RTEMS_ROOT=$PROJECT_ROOT/c/$RTEMS_BSP
## AC_SUBST(RTEMS_ROOT) AC_SUBST(RTEMS_ROOT)
AM_CONDITIONAL(RTEMS_CONFIG_PER_BSP, test x = x);
]) ])
AC_DEFUN(RTEMS_ENV_RTEMSCPU, AC_DEFUN(RTEMS_ENV_RTEMSCPU,
@@ -52,7 +53,7 @@ else
rtems_cv_RTEMS_BSP="multilib" rtems_cv_RTEMS_BSP="multilib"
RTEMS_BSP="$rtems_cv_RTEMS_BSP" RTEMS_BSP="$rtems_cv_RTEMS_BSP"
AC_SUBST(RTEMS_BSP) AC_SUBST(RTEMS_BSP)
## RTEMS_ROOT=$RTEMS_TOPdir/'$(top_builddir)'/c RTEMS_ROOT=$PROJECT_ROOT/c
## AC_SUBST(RTEMS_ROOT) AC_SUBST(RTEMS_ROOT)
fi fi
]) ])

View File

@@ -23,6 +23,9 @@ EOF
RTEMS_GAS_CODE16="$rtems_cv_prog_gas_code16" RTEMS_GAS_CODE16="$rtems_cv_prog_gas_code16"
fi fi
AC_SUBST(RTEMS_GAS_CODE16) 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
]) ])

View File

@@ -22,8 +22,6 @@ AC_REQUIRE([RTEMS_ENABLE_MULTILIB])
dnl We may get other options which we don't document: dnl We may get other options which we don't document:
dnl --with-target-subdir, --with-multisrctop, --with-multisubdir dnl --with-target-subdir, --with-multisrctop, --with-multisubdir
test -z "[$]{with_target_subdir}" && with_target_subdir=.
if test "[$]{srcdir}" = "."; then if test "[$]{srcdir}" = "."; then
if test "[$]{with_target_subdir}" != "."; then if test "[$]{with_target_subdir}" != "."; then
multilib_basedir="[$]{srcdir}/[$]{with_multisrctop}../ifelse([$2],,,[$2])" multilib_basedir="[$]{srcdir}/[$]{with_multisrctop}../ifelse([$2],,,[$2])"
@@ -42,18 +40,18 @@ else
fi fi
AC_OUTPUT_COMMANDS( AC_OUTPUT_COMMANDS(
if test -n "$CONFIG_FILES"; do if test -n "$CONFIG_FILES"; then
$ac_file" = ifelse([$1],,Makefile,[$1]) \ ac_file=[]ifelse([$1],,Makefile,[$1]) \
. ${multilib_basedir}/../config-ml.in . ${multilib_basedir}/../config-ml.in
fi, fi,[
srcdir=${srcdir} srcdir=${srcdir}
host=${host} host=${host}
target=${target} target=${target}
# with_multisrctop="${with_multisrctop}" with_multisrctop="${with_multisrctop}"
# with_target_subdir="${with_target_subdir}" with_target_subdir="${with_target_subdir}"
with_multisubdir="${with_multisubdir}" with_multisubdir="${with_multisubdir}"
ac_configure_args="${multilib_arg} ${ac_configure_args}" ac_configure_args="${multilib_arg} ${ac_configure_args}"
CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
multilib_basedir=${multilib_basedir} multilib_basedir=${multilib_basedir}
CC="${CC}") CC="${CC}"])
]) ])

View File

@@ -9,7 +9,6 @@ AC_DEFUN(RTEMS_PROG_CC,
AC_BEFORE([$0], [AC_PROG_CPP])dnl AC_BEFORE([$0], [AC_PROG_CPP])dnl
AC_BEFORE([$0], [AC_PROG_CC])dnl AC_BEFORE([$0], [AC_PROG_CC])dnl
AC_BEFORE([$0], [RTEMS_CANONICALIZE_TOOLS])dnl AC_BEFORE([$0], [RTEMS_CANONICALIZE_TOOLS])dnl
AC_REQUIRE([RTEMS_TOOL_PREFIX])dnl
AC_REQUIRE([RTEMS_ENABLE_LIBCDIR])dnl AC_REQUIRE([RTEMS_ENABLE_LIBCDIR])dnl
AC_REQUIRE([RTEMS_ENABLE_GCC28])dnl AC_REQUIRE([RTEMS_ENABLE_GCC28])dnl

View File

@@ -8,7 +8,6 @@ AC_DEFUN(RTEMS_PROG_CXX,
[ [
AC_BEFORE([$0], [AC_PROG_CXXCPP])dnl AC_BEFORE([$0], [AC_PROG_CXXCPP])dnl
AC_BEFORE([$0], [RTEMS_CANONICALIZE_TOOLS])dnl AC_BEFORE([$0], [RTEMS_CANONICALIZE_TOOLS])dnl
AC_REQUIRE([RTEMS_TOOL_PREFIX])dnl
AC_REQUIRE([RTEMS_ENABLE_LIBCDIR])dnl AC_REQUIRE([RTEMS_ENABLE_LIBCDIR])dnl
dnl Only accept g++ dnl Only accept g++

View File

@@ -15,25 +15,6 @@ dnl
AC_DEFUN(RTEMS_PROJECT_ROOT, AC_DEFUN(RTEMS_PROJECT_ROOT,
[dnl [dnl
AC_REQUIRE([RTEMS_TOP]) 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" PACKHEX="\$(PROJECT_TOPdir)/tools/build/packhex"
AC_SUBST(PACKHEX) AC_SUBST(PACKHEX)

View File

@@ -15,17 +15,37 @@ AC_BEFORE([$0], [AM_INIT_AUTOMAKE])dnl
ENDIF=endif ENDIF=endif
AC_SUBST(ENDIF) AC_SUBST(ENDIF)
## HACK to destinguish between using GNU and RTEMS canonicalization # with_target_subdir
AM_CONDITIONAL(RTEMS_CANONICALIZATION,test "x" = "y")
AC_ARG_WITH(target-subdir, AC_ARG_WITH(target-subdir,
[ --with-target-subdir=DIR], [ --with-target-subdir=DIR],
TARGET_SUBDIR="$withval", with_target_subdir="$withval",
TARGET_SUBDIR=".") with_target_subdir=".")
RTEMS_TOPdir="$1"; RTEMS_TOPdir="$1";
AC_SUBST(RTEMS_TOPdir) 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 Determine RTEMS Version string from the VERSION file
dnl Hopefully, Joel never changes its format ;- dnl Hopefully, Joel never changes its format ;-
AC_MSG_CHECKING([for RTEMS Version]) AC_MSG_CHECKING([for RTEMS Version])

View File

@@ -15,7 +15,7 @@ AC_DEFUN(RTEMS_OUTPUT_BUILD_SUBDIRS,
[ [
if test "$no_recursion" != yes; then if test "$no_recursion" != yes; then
if test $build_alias != $host_alias; then if test $build_alias != $host_alias; then
target_subdir="$target_alias" target_subdir="$host_alias"
else else
target_subdir="." target_subdir="."
fi fi
@@ -119,130 +119,3 @@ changequote([, ])dnl
done done
fi 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
])

View File

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