1 dnl Process this file with autoconf to produce a configure script.
3 AC_INIT(redboot-crt0.S)
5 if test "$srcdir" = "." ; then
6 if test "${with_target_subdir}" != "." ; then
7 libgloss_topdir="${srcdir}/${with_multisrctop}../../.."
9 libgloss_topdir="${srcdir}/${with_multisrctop}../.."
12 libgloss_topdir="${srcdir}/../.."
14 AC_CONFIG_AUX_DIR($libgloss_topdir)
21 # FIXME: We temporarily define our own version of AC_PROG_CC. This is
22 # copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS. We
23 # are probably using a cross compiler, which will not be able to fully
24 # link an executable. This should really be fixed in autoconf
27 AC_DEFUN(LIB_AC_PROG_CC,
28 [AC_BEFORE([$0], [AC_PROG_CPP])dnl
29 AC_CHECK_PROG(CC, gcc, gcc)
30 if test -z "$CC"; then
31 AC_CHECK_PROG(CC, cc, cc, , , /usr/ucb/cc)
32 test -z "$CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH])
37 if test $ac_cv_prog_gcc = yes; then
39 dnl Check whether -g works, even if CFLAGS is set, in case the package
40 dnl plays around with CFLAGS (such as to build both debugging and
41 dnl normal versions of a library), tasteless as that idea is.
42 ac_test_CFLAGS="${CFLAGS+set}"
43 ac_save_CFLAGS="$CFLAGS"
46 if test "$ac_test_CFLAGS" = set; then
47 CFLAGS="$ac_save_CFLAGS"
48 elif test $ac_cv_prog_cc_g = yes; then
55 test "${CFLAGS+set}" = set || CFLAGS="-g"
79 host_makefile_frag=${srcdir}/../config/default.mh
81 dnl We have to assign the same value to other variables because autoconf
82 dnl doesn't provide a mechanism to substitute a replacement keyword with
83 dnl arbitrary data or pathnames.
85 host_makefile_frag_path=$host_makefile_frag
86 AC_SUBST(host_makefile_frag_path)
87 AC_SUBST_FILE(host_makefile_frag)
90 . ${libgloss_topdir}/config-ml.in,
93 ac_configure_args="${ac_configure_args} --enable-multilib"
94 CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
95 libgloss_topdir=${libgloss_topdir}