|
|
dnl Process this file with autoconf to produce a configure script.
dnl
dnl $Id$
AC_PREREQ(2.13)
AC_INIT(c)
RTEMS_TOP(.)
# Abort if trying to build inside of the source tree.
if test -f VERSION; then
rm -f config.cache config.log confdefs.h
AC_MSG_ERROR([***]
[Attempt to build inside of the source tree]
[Please use a separate build directory, instead] )
fi
AC_CANONICAL_SYSTEM
AM_INIT_AUTOMAKE(cross,0,no)
AM_MAINTAINER_MODE
dnl These option are only in here to let --help report all supported
dnl options.
RTEMS_ENABLE_MULTIPROCESSING
RTEMS_ENABLE_POSIX
RTEMS_ENABLE_ITRON
RTEMS_ENABLE_NETWORKING
RTEMS_ENABLE_RDBG
RTEMS_ENABLE_INLINES
RTEMS_ENABLE_CXX
RTEMS_ENABLE_GCC28
RTEMS_ENABLE_LIBCDIR
RTEMS_ENABLE_TESTS
RTEMS_ENABLE_RTEMS_DEBUG
# these tools are built for the build environment
#
build_tools="tools/build tools/update tools/cpu"
# these libraries are used for the host environment
#
host_libs=""
# these tools are built for the host environment
#
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}
changequote(,)dnl
if test $target_alias = $host_alias;
then
HOST_SUBDIRS="$configdirs $target_configdirs"
TARGET_SUBDIRS=""
else
HOST_SUBDIRS="$configdirs"
TARGET_SUBDIRS=`echo "$target_configdirs" | \
sed -e "s%\([^ ]\+\)%$target_alias/\1%g"`
fi
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)
AC_OUTPUT(
Makefile
tools/Makefile
make/Makefile
make/custom/Makefile
make/Templates/Makefile
make/compilers/Makefile
doc/Makefile)
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
|