[444] | 1 | dnl Process this file with autoconf to produce a configure script. |
---|
| 2 | AC_PREREQ(2.59) |
---|
| 3 | AC_INIT(redboot-crt0.S) |
---|
| 4 | |
---|
| 5 | dnl Support --disable-newlib-supplied-syscalls |
---|
| 6 | AC_ARG_ENABLE(newlib-supplied-syscalls, |
---|
| 7 | [ --disable-newlib-supplied-syscalls disable newlib from supplying syscalls], |
---|
| 8 | [case "${enableval}" in |
---|
| 9 | yes) newlib_may_supply_syscalls=yes ;; |
---|
| 10 | no) newlib_may_supply_syscalls=no ;; |
---|
| 11 | *) AC_MSG_ERROR(bad value ${enableval} for newlib-supplied-syscalls option) ;; |
---|
| 12 | esac], [newlib_may_supply_syscalls=yes])dnl |
---|
| 13 | |
---|
| 14 | if test "x$newlib_may_supply_syscalls" = "xyes"; then |
---|
| 15 | BUILD_CRT0_TRUE='#' |
---|
| 16 | BUILD_CRT0_FALSE= |
---|
| 17 | else |
---|
| 18 | BUILD_CRT0_TRUE= |
---|
| 19 | BUILD_CRT0_FALSE='#' |
---|
| 20 | fi |
---|
| 21 | |
---|
| 22 | AC_SUBST(BUILD_CRT0_TRUE) |
---|
| 23 | AC_SUBST(BUILD_CRT0_FALSE) |
---|
| 24 | |
---|
| 25 | if test "$srcdir" = "." ; then |
---|
| 26 | if test "${with_target_subdir}" != "." ; then |
---|
| 27 | libgloss_topdir="${srcdir}/${with_multisrctop}../../.." |
---|
| 28 | else |
---|
| 29 | libgloss_topdir="${srcdir}/${with_multisrctop}../.." |
---|
| 30 | fi |
---|
| 31 | else |
---|
| 32 | libgloss_topdir="${srcdir}/../.." |
---|
| 33 | fi |
---|
| 34 | AC_CONFIG_AUX_DIR($libgloss_topdir) |
---|
| 35 | |
---|
| 36 | AC_CANONICAL_SYSTEM |
---|
| 37 | AC_ARG_PROGRAM |
---|
| 38 | |
---|
| 39 | AC_PROG_INSTALL |
---|
| 40 | |
---|
| 41 | LIB_AC_PROG_CC |
---|
| 42 | AS=${AS-as} |
---|
| 43 | AC_SUBST(AS) |
---|
| 44 | AR=${AR-ar} |
---|
| 45 | AC_SUBST(AR) |
---|
| 46 | LD=${LD-ld} |
---|
| 47 | AC_SUBST(LD) |
---|
| 48 | AC_PROG_RANLIB |
---|
| 49 | LIB_AM_PROG_AS |
---|
| 50 | |
---|
| 51 | case "${target}" in |
---|
| 52 | *-*-elf | *-*-eabi* | *-*-tirtos*) |
---|
| 53 | objtype=elf- |
---|
| 54 | ;; |
---|
| 55 | *-*-coff) |
---|
| 56 | objtype=coff- |
---|
| 57 | ;; |
---|
| 58 | esac |
---|
| 59 | |
---|
| 60 | AC_SUBST(objtype) |
---|
| 61 | |
---|
| 62 | host_makefile_frag=`cd $srcdir/../config;pwd`/default.mh |
---|
| 63 | |
---|
| 64 | dnl We have to assign the same value to other variables because autoconf |
---|
| 65 | dnl doesn't provide a mechanism to substitute a replacement keyword with |
---|
| 66 | dnl arbitrary data or pathnames. |
---|
| 67 | dnl |
---|
| 68 | host_makefile_frag_path=$host_makefile_frag |
---|
| 69 | AC_SUBST(host_makefile_frag_path) |
---|
| 70 | AC_SUBST_FILE(host_makefile_frag) |
---|
| 71 | |
---|
| 72 | # Configure cpu init plug-ins |
---|
| 73 | if test -d "${srcdir}/cpu-init"; then |
---|
| 74 | subdirs="${subdirs} cpu-init" |
---|
| 75 | AC_CONFIG_FILES(cpu-init/Makefile, |
---|
| 76 | . ${libgloss_topdir}/config-ml.in, |
---|
| 77 | srcdir=${srcdir} |
---|
| 78 | target=${target} |
---|
| 79 | with_multisubdir=${with_multisubdir} |
---|
| 80 | ac_configure_args="${ac_configure_args} --enable-multilib" |
---|
| 81 | CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} |
---|
| 82 | libgloss_topdir=${libgloss_topdir} |
---|
| 83 | ) |
---|
| 84 | AC_SUBST(subdirs) |
---|
| 85 | fi |
---|
| 86 | |
---|
| 87 | AC_CONFIG_FILES(Makefile, |
---|
| 88 | . ${libgloss_topdir}/config-ml.in, |
---|
| 89 | srcdir=${srcdir} |
---|
| 90 | target=${target} |
---|
| 91 | with_multisubdir=${with_multisubdir} |
---|
| 92 | ac_configure_args="${ac_configure_args} --enable-multilib" |
---|
| 93 | CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} |
---|
| 94 | libgloss_topdir=${libgloss_topdir} |
---|
| 95 | ) |
---|
| 96 | AC_OUTPUT |
---|
| 97 | |
---|