1 dnl Process this file with autoconf to produce a configure script.
5 if test "${enable_shared}" = "yes" ; then
6 echo "Shared libraries not supported for cross compiling, ignored"
9 if test "${srcdir}" = "." ; then
10 if test "${with_target_subdir}" != "." ; then
11 libgloss_topdir="${srcdir}/${with_multisrctop}../.."
13 libgloss_topdir="${srcdir}/${with_multisrctop}.."
16 libgloss_topdir="${srcdir}/.."
18 AC_CONFIG_AUX_DIR($libgloss_topdir)
24 if test -z "${with_multisubdir}" ; then
25 configdirs="doc libnosys"
31 i[[3456]]86-*-elf*|i[[3456]]86-*-coff*)
32 configdirs="${configdirs} i386 testsuite";
35 configdirs="${configdirs} m32r testsuite"
37 m68hc11-*-*|m6811-*-*|m68hc12-*-*|m6812-*-*)
38 configdirs="m68hc11 testsuite"
41 configdirs="${configdirs} m68k testsuite"
44 configdirs="${configdirs} pa testsuite"
47 configdirs="${configdirs} i960 testsuite"
50 configdirs="${configdirs} sparc testsuite"
53 configdirs="${configdirs} sparc testsuite"
56 configdirs="${configdirs} sparc testsuite"
59 configdirs="${configdirs} sparc testsuite"
62 configdirs="${configdirs} sparc sparc/libsys testsuite"
68 configdirs="${configdirs} arm"
77 configdirs="${configdirs} mips testsuite"
79 powerpc-*-*|powerpcle-*-*)
80 configdirs="${configdirs} rs6000 testsuite"
83 configdirs="${configdirs} mn10200 testsuite"
86 configdirs="${configdirs} mn10300 testsuite"
89 configdirs="${configdirs} crx"
92 configdirs="${configdirs} d30v testsuite"
95 configdirs="${configdirs} fr30 testsuite"
98 configdirs="${configdirs} frv testsuite"
101 configdirs="${configdirs} mcore testsuite"
104 configdirs="${configdirs} xstormy16 testsuite"
106 strongarm-*-elf | strongarm-*-coff)
107 configdirs="${configdirs} arm testsuite";
109 arm*-*-elf | arm*-*-coff)
110 configdirs="${configdirs} arm testsuite";
112 ep9312-*-elf | ep9312-*-coff)
113 configdirs="${configdirs} arm testsuite";
115 xscale-*-elf | xscale-*-coff)
116 configdirs="${configdirs} arm testsuite";
121 # temporarily strip out testsuite
122 configdirs=`echo $configdirs | sed 's/testsuite//'`
124 AC_CONFIG_SUBDIRS($configdirs)
126 # FIXME: We temporarily define our own version of AC_PROG_CC. This is
127 # copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS. We
128 # are probably using a cross compiler, which will not be able to fully
129 # link an executable. This should really be fixed in autoconf
132 AC_DEFUN(LIB_AC_PROG_CC,
133 [AC_BEFORE([$0], [AC_PROG_CPP])dnl
134 AC_CHECK_PROG(CC, gcc, gcc)
135 if test -z "$CC"; then
136 AC_CHECK_PROG(CC, cc, cc, , , /usr/ucb/cc)
137 test -z "$CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH])
142 if test $ac_cv_prog_gcc = yes; then
144 dnl Check whether -g works, even if CFLAGS is set, in case the package
145 dnl plays around with CFLAGS (such as to build both debugging and
146 dnl normal versions of a library), tasteless as that idea is.
147 ac_test_CFLAGS="${CFLAGS+set}"
148 ac_save_CFLAGS="$CFLAGS"
151 if test "$ac_test_CFLAGS" = set; then
152 CFLAGS="$ac_save_CFLAGS"
153 elif test $ac_cv_prog_cc_g = yes; then
160 test "${CFLAGS+set}" = set || CFLAGS="-g"
167 AC_CHECK_PROG(AR, ar, ar, :)
174 host_makefile_frag=${srcdir}/config/default.mh
176 dnl We have to assign the same value to other variables because autoconf
177 dnl doesn't provide a mechanism to substitute a replacement keyword with
178 dnl arbitrary data or pathnames.
180 host_makefile_frag_path=$host_makefile_frag
181 AC_SUBST(host_makefile_frag_path)
182 AC_SUBST_FILE(host_makefile_frag)
184 # for now, only add multilibs for specific targets
186 . ${libgloss_topdir}/config-ml.in,
189 with_multisubdir=${with_multisubdir}
190 ac_configure_args="--enable-multilib ${ac_configure_args}"
191 CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
192 libgloss_topdir=${libgloss_topdir}