2002-01-08 02:12:32 +08:00
|
|
|
dnl Process this file with autoconf to produce a configure script.
|
2006-04-20 03:44:05 +08:00
|
|
|
AC_PREREQ(2.59)
|
2002-01-08 02:12:32 +08:00
|
|
|
AC_INIT(redboot-crt0.S)
|
|
|
|
|
2004-06-18 03:33:27 +08:00
|
|
|
dnl Support --disable-newlib-supplied-syscalls
|
|
|
|
AC_ARG_ENABLE(newlib-supplied-syscalls,
|
|
|
|
[ --disable-newlib-supplied-syscalls disable newlib from supplying syscalls],
|
|
|
|
[case "${enableval}" in
|
|
|
|
yes) newlib_may_supply_syscalls=yes ;;
|
|
|
|
no) newlib_may_supply_syscalls=no ;;
|
|
|
|
*) AC_MSG_ERROR(bad value ${enableval} for newlib-supplied-syscalls option) ;;
|
|
|
|
esac], [newlib_may_supply_syscalls=yes])dnl
|
|
|
|
|
|
|
|
if test "x$newlib_may_supply_syscalls" = "xyes"; then
|
|
|
|
BUILD_CRT0_TRUE='#'
|
|
|
|
BUILD_CRT0_FALSE=
|
2005-10-18 05:17:17 +08:00
|
|
|
else
|
|
|
|
BUILD_CRT0_TRUE=
|
|
|
|
BUILD_CRT0_FALSE='#'
|
2004-06-18 03:33:27 +08:00
|
|
|
fi
|
|
|
|
|
2005-10-21 04:17:50 +08:00
|
|
|
AC_SUBST(BUILD_CRT0_TRUE)
|
|
|
|
AC_SUBST(BUILD_CRT0_FALSE)
|
|
|
|
|
2002-01-08 02:12:32 +08:00
|
|
|
if test "$srcdir" = "." ; then
|
|
|
|
if test "${with_target_subdir}" != "." ; then
|
|
|
|
libgloss_topdir="${srcdir}/${with_multisrctop}../../.."
|
|
|
|
else
|
|
|
|
libgloss_topdir="${srcdir}/${with_multisrctop}../.."
|
|
|
|
fi
|
|
|
|
else
|
|
|
|
libgloss_topdir="${srcdir}/../.."
|
|
|
|
fi
|
|
|
|
AC_CONFIG_AUX_DIR($libgloss_topdir)
|
|
|
|
|
|
|
|
AC_CANONICAL_SYSTEM
|
|
|
|
AC_ARG_PROGRAM
|
|
|
|
|
|
|
|
AC_PROG_INSTALL
|
|
|
|
|
|
|
|
LIB_AC_PROG_CC
|
|
|
|
AS=${AS-as}
|
|
|
|
AC_SUBST(AS)
|
|
|
|
AR=${AR-ar}
|
|
|
|
AC_SUBST(AR)
|
|
|
|
LD=${LD-ld}
|
|
|
|
AC_SUBST(LD)
|
|
|
|
AC_PROG_RANLIB
|
2006-04-20 03:44:05 +08:00
|
|
|
LIB_AM_PROG_AS
|
2002-01-08 02:12:32 +08:00
|
|
|
|
|
|
|
case "${target}" in
|
2017-04-14 07:17:37 +08:00
|
|
|
*-*-elf | *-*-eabi* | *-*-tirtos*)
|
2002-01-08 02:12:32 +08:00
|
|
|
objtype=elf-
|
|
|
|
;;
|
|
|
|
*-*-coff)
|
|
|
|
objtype=coff-
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
AC_SUBST(objtype)
|
|
|
|
|
2014-01-11 07:04:01 +08:00
|
|
|
host_makefile_frag=`cd $srcdir/../config;pwd`/default.mh
|
2002-01-08 02:12:32 +08:00
|
|
|
|
|
|
|
dnl We have to assign the same value to other variables because autoconf
|
|
|
|
dnl doesn't provide a mechanism to substitute a replacement keyword with
|
|
|
|
dnl arbitrary data or pathnames.
|
|
|
|
dnl
|
|
|
|
host_makefile_frag_path=$host_makefile_frag
|
|
|
|
AC_SUBST(host_makefile_frag_path)
|
|
|
|
AC_SUBST_FILE(host_makefile_frag)
|
|
|
|
|
2013-09-20 22:23:41 +08:00
|
|
|
# Configure cpu init plug-ins
|
|
|
|
if test -d "${srcdir}/cpu-init"; then
|
|
|
|
subdirs="${subdirs} cpu-init"
|
|
|
|
AC_CONFIG_FILES(cpu-init/Makefile,
|
|
|
|
. ${libgloss_topdir}/config-ml.in,
|
|
|
|
srcdir=${srcdir}
|
|
|
|
target=${target}
|
|
|
|
with_multisubdir=${with_multisubdir}
|
|
|
|
ac_configure_args="${ac_configure_args} --enable-multilib"
|
|
|
|
CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
|
|
|
|
libgloss_topdir=${libgloss_topdir}
|
|
|
|
)
|
|
|
|
AC_SUBST(subdirs)
|
|
|
|
fi
|
|
|
|
|
2006-04-20 03:44:05 +08:00
|
|
|
AC_CONFIG_FILES(Makefile,
|
2002-01-08 02:12:32 +08:00
|
|
|
. ${libgloss_topdir}/config-ml.in,
|
|
|
|
srcdir=${srcdir}
|
|
|
|
target=${target}
|
2006-05-11 04:51:41 +08:00
|
|
|
with_multisubdir=${with_multisubdir}
|
2002-01-08 02:12:32 +08:00
|
|
|
ac_configure_args="${ac_configure_args} --enable-multilib"
|
|
|
|
CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
|
|
|
|
libgloss_topdir=${libgloss_topdir}
|
|
|
|
)
|
2006-04-20 03:44:05 +08:00
|
|
|
AC_OUTPUT
|
2002-01-08 02:12:32 +08:00
|
|
|
|