2002-01-07 19:12:32 +01:00
|
|
|
dnl Process this file with autoconf to produce a configure script.
|
2006-04-19 21:44:05 +02:00
|
|
|
AC_PREREQ(2.59)
|
2002-01-07 19:12:32 +01:00
|
|
|
AC_INIT(redboot-crt0.S)
|
|
|
|
|
2004-06-17 21:33:27 +02: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-17 23:17:17 +02:00
|
|
|
else
|
|
|
|
BUILD_CRT0_TRUE=
|
|
|
|
BUILD_CRT0_FALSE='#'
|
2004-06-17 21:33:27 +02:00
|
|
|
fi
|
|
|
|
|
2005-10-20 22:17:50 +02:00
|
|
|
AC_SUBST(BUILD_CRT0_TRUE)
|
|
|
|
AC_SUBST(BUILD_CRT0_FALSE)
|
|
|
|
|
2002-01-07 19:12:32 +01: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-19 21:44:05 +02:00
|
|
|
LIB_AM_PROG_AS
|
2002-01-07 19:12:32 +01:00
|
|
|
|
|
|
|
case "${target}" in
|
2004-10-01 13:37:17 +02:00
|
|
|
*-*-elf | *-*-eabi)
|
2002-01-07 19:12:32 +01:00
|
|
|
objtype=elf-
|
|
|
|
;;
|
|
|
|
*-*-coff)
|
|
|
|
objtype=coff-
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
AC_SUBST(objtype)
|
|
|
|
|
2014-01-11 00:04:01 +01:00
|
|
|
host_makefile_frag=`cd $srcdir/../config;pwd`/default.mh
|
2002-01-07 19:12:32 +01: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 16:23:41 +02: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-19 21:44:05 +02:00
|
|
|
AC_CONFIG_FILES(Makefile,
|
2002-01-07 19:12:32 +01:00
|
|
|
. ${libgloss_topdir}/config-ml.in,
|
|
|
|
srcdir=${srcdir}
|
|
|
|
target=${target}
|
2006-05-10 22:51:41 +02:00
|
|
|
with_multisubdir=${with_multisubdir}
|
2002-01-07 19:12:32 +01:00
|
|
|
ac_configure_args="${ac_configure_args} --enable-multilib"
|
|
|
|
CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
|
|
|
|
libgloss_topdir=${libgloss_topdir}
|
|
|
|
)
|
2006-04-19 21:44:05 +02:00
|
|
|
AC_OUTPUT
|
2002-01-07 19:12:32 +01:00
|
|
|
|