]>
Commit | Line | Data |
---|---|---|
03261851 | 1 | dnl Process this file with autoconf to produce a configure script. |
4e71dc1e JJ |
2 | AC_PREREQ(2.59) |
3 | AC_INIT([libgloss],[LIBGLOSS_VERSION]) | |
4 | AC_CONFIG_SRCDIR([libnosys]) | |
03261851 RK |
5 | |
6 | if test "${enable_shared}" = "yes" ; then | |
7 | echo "Shared libraries not supported for cross compiling, ignored" | |
8 | fi | |
9 | ||
10 | if test "${srcdir}" = "." ; then | |
11 | if test "${with_target_subdir}" != "." ; then | |
12 | libgloss_topdir="${srcdir}/${with_multisrctop}../.." | |
13 | else | |
14 | libgloss_topdir="${srcdir}/${with_multisrctop}.." | |
15 | fi | |
16 | else | |
17 | libgloss_topdir="${srcdir}/.." | |
18 | fi | |
19 | AC_CONFIG_AUX_DIR($libgloss_topdir) | |
20 | ||
21 | AC_PROG_INSTALL | |
22 | ||
23 | AC_CANONICAL_SYSTEM | |
4e71dc1e | 24 | AM_INIT_AUTOMAKE([cygnus no-define 1.9.5]) |
03261851 RK |
25 | |
26 | if test -z "${with_multisubdir}" ; then | |
4e71dc1e | 27 | AC_CONFIG_SUBDIRS(doc) |
03261851 RK |
28 | fi |
29 | ||
4e71dc1e JJ |
30 | AC_CONFIG_SUBDIRS(libnosys) |
31 | ||
03261851 | 32 | case "${target}" in |
4e71dc1e JJ |
33 | i[[3456]]86-*-elf* | i[[3456]]86-*-coff*) |
34 | AC_CONFIG_SUBDIRS(i386) | |
c19f8a6a | 35 | config_testsuite=true |
03261851 RK |
36 | ;; |
37 | m32r-*-*) | |
4e71dc1e | 38 | AC_CONFIG_SUBDIRS(m32r) |
c19f8a6a | 39 | config_testsuite=true |
03261851 | 40 | ;; |
4e71dc1e JJ |
41 | m68hc11-*-* | m6811-*-* | m68hc12-*-* | m6812-*-*) |
42 | AC_CONFIG_SUBDIRS(m68hc11) | |
c19f8a6a | 43 | config_testsuite=true |
63a93e9d | 44 | ;; |
1b69cb3a | 45 | fido-*-* | m68*-*-*) |
4e71dc1e | 46 | AC_CONFIG_SUBDIRS(m68k) |
c19f8a6a | 47 | config_testsuite=true |
03261851 RK |
48 | ;; |
49 | hppa*-*-pro*) | |
4e71dc1e | 50 | AC_CONFIG_SUBDIRS(pa) |
c19f8a6a | 51 | config_testsuite=true |
03261851 RK |
52 | ;; |
53 | i960-*-coff) | |
4e71dc1e | 54 | AC_CONFIG_SUBDIRS(i960) |
c19f8a6a | 55 | config_testsuite=true |
03261851 | 56 | ;; |
4e71dc1e JJ |
57 | sparclet-*-aout* | sparc-*-elf* | sparc64-*-elf* | sparc86x-*-* | sparclite-*-*) |
58 | AC_CONFIG_SUBDIRS(sparc) | |
c19f8a6a | 59 | config_testsuite=true |
03261851 | 60 | ;; |
4e71dc1e JJ |
61 | sh*-*-pe | mips*-*-pe | *arm-wince-pe) |
62 | AC_CONFIG_SUBDIRS(wince) | |
03261851 RK |
63 | ;; |
64 | mips*-*-*) | |
4e71dc1e | 65 | AC_CONFIG_SUBDIRS(mips) |
c19f8a6a | 66 | config_testsuite=true |
03261851 RK |
67 | ;; |
68 | powerpc-*-*|powerpcle-*-*) | |
4e71dc1e | 69 | AC_CONFIG_SUBDIRS(rs6000) |
c19f8a6a | 70 | config_testsuite=true |
03261851 RK |
71 | ;; |
72 | mn10200-*-*) | |
4e71dc1e | 73 | AC_CONFIG_SUBDIRS(mn10200) |
c19f8a6a | 74 | config_testsuite=true |
03261851 RK |
75 | ;; |
76 | mn10300-*-*) | |
4e71dc1e | 77 | AC_CONFIG_SUBDIRS(mn10300) |
c19f8a6a | 78 | config_testsuite=true |
03261851 | 79 | ;; |
c0977673 JJ |
80 | bfin-*-*) |
81 | AC_CONFIG_SUBDIRS(bfin) | |
c19f8a6a | 82 | config_testsuite=true |
c0977673 | 83 | ;; |
3a267038 | 84 | cris-*-* | crisv32-*-*) |
4e71dc1e | 85 | AC_CONFIG_SUBDIRS(cris) |
c19f8a6a | 86 | config_testsuite=true |
3a267038 | 87 | ;; |
49a8b8f0 | 88 | crx-*-*) |
4e71dc1e | 89 | AC_CONFIG_SUBDIRS(crx) |
49a8b8f0 | 90 | ;; |
03261851 | 91 | d30v-*-*) |
4e71dc1e | 92 | AC_CONFIG_SUBDIRS(d30v) |
c19f8a6a | 93 | config_testsuite=true |
03261851 RK |
94 | ;; |
95 | fr30-*-*) | |
4e71dc1e | 96 | AC_CONFIG_SUBDIRS(fr30) |
c19f8a6a | 97 | config_testsuite=true |
03261851 | 98 | ;; |
c2b0dec2 | 99 | frv*-*-*) |
4e71dc1e | 100 | AC_CONFIG_SUBDIRS(frv) |
c19f8a6a | 101 | config_testsuite=true |
fb921031 | 102 | ;; |
03261851 | 103 | mcore-*-*) |
4e71dc1e | 104 | AC_CONFIG_SUBDIRS(mcore) |
c19f8a6a | 105 | config_testsuite=true |
03261851 | 106 | ;; |
1d94f731 JJ |
107 | mep-*-*) |
108 | AC_CONFIG_SUBDIRS(mep) | |
109 | config_testsuite = true; | |
110 | ;; | |
74ecef0d | 111 | mt-*-*) |
4e71dc1e | 112 | AC_CONFIG_SUBDIRS(mt) |
c19f8a6a | 113 | config_testsuite=true |
4e71dc1e | 114 | ;; |
f6eff1c0 | 115 | xstormy16-*-*) |
4e71dc1e | 116 | AC_CONFIG_SUBDIRS(xstormy16) |
c19f8a6a | 117 | config_testsuite=true |
f6eff1c0 | 118 | ;; |
a663cd89 | 119 | m32c-*-*) |
4e71dc1e | 120 | AC_CONFIG_SUBDIRS(m32c) |
c19f8a6a | 121 | config_testsuite=true |
a7364ade | 122 | ;; |
4e71dc1e JJ |
123 | strongarm-*-elf | strongarm-*-coff | arm*-*-elf | arm*-*-coff | ep9312-*-elf | ep9312-*-coff | xscale-*-elf | xscale-*-coff | *arm-*-*) |
124 | AC_CONFIG_SUBDIRS(arm) | |
c19f8a6a | 125 | config_testsuite=true |
62a25ce1 | 126 | ;; |
0486bb7f JJ |
127 | spu-*-elf) |
128 | AC_CONFIG_SUBDIRS(spu) | |
c19f8a6a | 129 | config_testsuite=false |
0486bb7f | 130 | ;; |
7be5e72f | 131 | iq2000-*-*) |
4e71dc1e | 132 | AC_CONFIG_SUBDIRS(iq2000) |
c19f8a6a | 133 | config_testsuite=true |
4e71dc1e | 134 | ;; |
03261851 RK |
135 | esac |
136 | ||
4e71dc1e JJ |
137 | # For now, don't bother configuring testsuite |
138 | # | |
139 | # if test ${config_testsuite); then AC_CONFIG_SUBDIRS(testsuite); fi | |
140 | # | |
03261851 RK |
141 | |
142 | LIB_AC_PROG_CC | |
143 | AS=${AS-as} | |
144 | AC_SUBST(AS) | |
145 | AC_CHECK_PROG(AR, ar, ar, :) | |
146 | AR=${AR-ar} | |
147 | AC_SUBST(AR) | |
148 | LD=${LD-ld} | |
149 | AC_SUBST(LD) | |
150 | AC_PROG_RANLIB | |
4e71dc1e | 151 | LIB_AM_PROG_AS |
03261851 RK |
152 | |
153 | host_makefile_frag=${srcdir}/config/default.mh | |
154 | ||
155 | dnl We have to assign the same value to other variables because autoconf | |
156 | dnl doesn't provide a mechanism to substitute a replacement keyword with | |
157 | dnl arbitrary data or pathnames. | |
158 | dnl | |
159 | host_makefile_frag_path=$host_makefile_frag | |
160 | AC_SUBST(host_makefile_frag_path) | |
161 | AC_SUBST_FILE(host_makefile_frag) | |
162 | ||
00a4b31a JJ |
163 | if test "${multilib}" = "yes"; then |
164 | multilib_arg="--enable-multilib" | |
165 | else | |
166 | multilib_arg= | |
167 | fi | |
168 | ||
03261851 | 169 | # for now, only add multilibs for specific targets |
00a4b31a JJ |
170 | AC_CONFIG_FILES([Makefile], |
171 | [if test -n "$CONFIG_FILES"; then | |
172 | unset ac_file | |
173 | . ${libgloss_topdir}/config-ml.in | |
174 | fi], | |
03261851 RK |
175 | srcdir=${srcdir} |
176 | target=${target} | |
177 | with_multisubdir=${with_multisubdir} | |
178 | ac_configure_args="--enable-multilib ${ac_configure_args}" | |
179 | CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} | |
180 | libgloss_topdir=${libgloss_topdir} | |
00a4b31a JJ |
181 | CC="${CC}" |
182 | LDFLAGS=${LDFLAGS} | |
03261851 | 183 | ) |
4e71dc1e | 184 | AC_OUTPUT |
03261851 RK |
185 | |
186 |