]> Git Repo - binutils.git/blob - gas/configure.in
* config/tc-mips.h (LOCAL_LABEL): Define as 0, for compatibility
[binutils.git] / gas / configure.in
1 # This file is configure.in
2 #
3 #   Copyright (C) 1987-1992,1993,1994 Free Software Foundation, Inc.
4 #
5 #  This file is part of GAS, the GNU Assembler.
6 #
7 #   GAS is free software; you can redistribute it and/or modify
8 #   it under the terms of the GNU General Public License as published by
9 #   the Free Software Foundation; either version 2, or (at your option)
10 #   any later version.
11 #
12 #   GAS is distributed in the hope that it will be useful,
13 #   but WITHOUT ANY WARRANTY; without even the implied warranty of
14 #   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 #   GNU General Public License for more details.
16 #
17 #   You should have received a copy of the GNU General Public License
18 #   along with GAS; see the file COPYING.  If not, write to
19 #   the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
20 #
21
22 # This file was written, and is maintained by K. Richard Pixley
23 # <[email protected]>.
24
25 # This file is a shell script that supplies the information necessary
26 # to tailor a template configure script into the configure script
27 # appropriate for this directory.  For more information, check any
28 # existing configure script.
29
30 srctrigger=as.c
31 srcname="gas"
32 need_bfd=no
33 bfd_gas=no
34 configdirs="doc testsuite"
35
36 # per-host:
37
38 gas_host=generic
39
40 case "${host}" in
41   a29k-*-*)                     gas_host=a29k           ;;
42
43   alpha-*-osf*)                 gas_host=ansi           ;;
44
45   hppa*-*-hpux*)                gas_host=hpux           ;;
46   hppa*-*-bsd*)                 gas_host=hppabsd        ;;
47   hppa*-*-osf*)                 gas_host=hppaosf        ;;
48   hppa*-*-hiux*)                gas_host=hpux           ;;
49
50   i[345]86-ibm-aix*)            gas_host=i386aix        ;;
51   i[345]86-*-isc*)              gas_host=sysv           ;;
52   i[345]86-sun-sunos*)          gas_host=sun386         ;;
53   i[345]86-*-mach*)             gas_host=mach3          ;;
54   i[345]86-*-go32)              host_makefile_frag=config/go32.mh       
55                                 gas_host=go32           ;;
56
57   m68k-sun-sunos*)              gas_host=sun3           ;;
58   m68*-*-hpux)                  gas_host=hpux           ;;
59
60   mips*-dec-ultrix*)            gas_host=decstatn       ;;
61   mips*-*-bsd*)                 gas_host=mipsbsd        ;;
62   mips*-sgi-irix*)              gas_host=irix           ;;
63
64   rs6000-*-*)                   gas_host=rs6000         ;;
65
66   sparc-sun-sunos*)             gas_host=sun4           ;;
67   sparc-sun-solaris2*)          gas_host=sysv           ;;
68
69   vax-*-vms*)                   gas_host=vms            ;;
70   vax-*-bsd*)                   gas_host=vax            ;;
71   vax-*-ultrix*)                gas_host=vax            ;;
72
73   *-*-sysv4* | *-*-unixware)    gas_host=sysv           ;;
74
75   *-*-ansi | *-*-hpux | *-*-sysv)
76                                 gas_host=${host_os}     ;;
77
78 esac
79
80 if [ ! -r ${srcdir}/config/ho-${gas_host}.h ]; then
81   echo '*** GAS does not support host' ${host} 1>&2
82   exit 1
83 fi
84
85 # per-target:
86
87 case ${with_bfd_assembler} in
88   yes)
89     echo "*** Warning:  GAS BFD configuration option not yet fully supported" 1>&2
90     need_bfd=yes
91     bfd_gas=yes
92     ;;
93   no | "")
94     ;;
95   *)
96     echo "*** Bad value \"${with_bfd_assembler}\" for --with-bfd-assembler option" 1>&2
97     exit 1
98     ;;
99 esac
100
101 # assign cpu type
102 emulation=generic
103
104 # default is big
105 endian=big
106
107 # check for architecture variants
108 case ${target_cpu} in
109   # Actually we've only got support for the 1.1, so we shouldn't generalize,
110   # but this is what the support files are named...
111   hppa*)        cpu_type=hppa ;;
112   i[45]86)      cpu_type=i386 ;;
113   m680[012346]0) cpu_type=m68k ;;
114   m68008)       cpu_type=m68k ;;
115   m683??)       cpu_type=m68k ;;
116   m8*)          cpu_type=m88k ;;
117   mips*el)      cpu_type=mips endian=little;;
118   mips*)        cpu_type=mips ;;
119   powerpc*)     cpu_type=ppc ;;
120   rs6000*)      cpu_type=ppc ;;
121   sparc64)      cpu_type=sparc obj_format=elf extra_def=sparcv9 ;;
122   sparclite*)   cpu_type=sparc ;;
123   *)            cpu_type=${target_cpu} ;;
124 esac
125
126 # do we need the opcodes library?
127 case ${cpu_type} in
128   alpha | vax)
129     opcodes=
130     ;;
131   *)
132     opcodes="../opcodes/libopcodes.a"
133     ;;
134 esac
135
136 gas_target=${cpu_type}
137 generic_target=${cpu_type}-${target_vendor}-${target_os}
138 dev=no
139
140 # assign object format
141 case ${generic_target} in
142   a29k-amd-udi)         obj_format=coff gas_target=ebmon29k ;;
143   a29k-amd-ebmon)       obj_format=coff gas_target=ebmon29k ;;
144
145   alpha-*-netware*)     obj_format=ecoff ;;
146   alpha-*-osf*)         obj_format=ecoff ;;
147
148   hppa-*-*elf*)         obj_format=elf emulation=hppa ;;
149   hppa-*-osf*)          obj_format=som emulation=hppa ;;
150   hppa-*-hpux*)         obj_format=som emulation=hppa ;;
151   hppa-*-bsd*)          obj_format=som emulation=hppa ;;
152   hppa-*-hiux*)         obj_format=som emulation=hppa ;;
153
154   h8300-*-coff)         obj_format=coff ;;
155
156   i386-ibm-aix*)        obj_format=coff gas_target=i386coff
157                          emulation=i386aix ;;
158   i386-*-bsd*)          obj_format=aout emulation=386bsd ;;
159   i386-*-netbsd0.8)     obj_format=aout emulation=386bsd ;;
160   i386-*-netbsd*)       obj_format=aout emulation=netbsd ;;
161   i386-*-linux*elf*)    obj_format=elf  emulation=linux ;;
162   i386-*-linux*coff*)   obj_format=coff emulation=linux
163                          gas_target=i386coff ;;
164   i386-*-linux*)        obj_format=aout emulation=linux ;;
165   i386-*-lynxos*)       obj_format=coff gas_target=i386coff
166                          emulation=lynx ;;
167   i386-*-sysv4* | i386-*-solaris* | i386-*-elf)
168                         obj_format=elf ;;
169   i386-*-coff | i386-*-sysv* | i386-*-sco* | i386-*-isc*)
170                         obj_format=coff gas_target=i386coff ;;
171   i386-*-vsta)          obj_format=aout ;;
172   i386-*-go32)          obj_format=coff gas_target=i386coff ;;
173   i386-*-mach* | i386-*-gnu*)
174                         obj_format=aout emulation=mach bfd_gas=yes ;;
175
176   i960-*-bout)          obj_format=bout ;;
177   i960-*-coff)          obj_format=coff emulation=ic960 gas_target=ic960coff ;;
178   i960-*-nindy*)        obj_format=bout ;;
179   i960-*-vxworks4*)     obj_format=bout ;;
180   i960-*-vxworks5.0)    obj_format=bout ;;
181   i960-*-vxworks5.*)    obj_format=coff emulation=ic960 gas_target=ic960coff ;;
182   i960-*-vxworks*)      obj_format=bout ;;
183
184   m68k-wrs-vxworks | m68k-ericsson-ose | m68k-*-sunos*)
185                         obj_format=aout emulation=sun3 ;;
186   m68k-motorola-sysv)   obj_format=coff gas_target=m68kcoff emulation=delta ;;
187   m68k-bull-sysv3*)     obj_format=coff gas_target=m68kcoff emulation=dpx2 ;;
188   m68k-apollo-*)        obj_format=coff gas_target=apollo emulation=apollo ;;
189   m68k-*-coff | m68k-*-sysv*)
190                         obj_format=coff gas_target=m68kcoff ;;
191   m68k-*-hpux)          obj_format=hp300 emulation=hp300 ;;
192   m68k-*-lynxos*)       obj_format=coff gas_target=m68kcoff
193                          emulation=lynx ;;
194
195   m88k-*-coff*)         obj_format=coff gas_target=m88kcoff ;;
196
197   # don't change emulation like *-*-bsd does
198   mips-*-bsd*)          bfd_gas=yes obj_format=aout gas_target=mips-lit ;;
199   mips-*-ultrix*)       obj_format=ecoff gas_target=mips-lit ;;
200   mips-*-ecoff*)        obj_format=ecoff 
201                         if [ $endian = big ] ; then
202                           gas_target=mips-big
203                         else
204                           gas_target=mips-lit
205                         fi 
206                         ;;
207   mips-*-ecoff*)        obj_format=ecoff gas_target=mips-big ;;
208   mips-*-irix5*)        obj_format=elf gas_target=mips-big ;;
209   mips-*-irix*)         obj_format=ecoff gas_target=mips-big ;;
210   mips-*-riscos*)       obj_format=ecoff gas_target=mips-big ;;
211   mips-*-sysv*)         obj_format=ecoff gas_target=mips-big ;;
212   mips-*-elf*)          obj_format=elf 
213                         if [ $endian = big ] ; then
214                           gas_target=mips-big
215                         else
216                           gas_target=mips-lit
217                         fi
218                         ;;
219
220   ppc-*-aix*)           obj_format=coff bfd_gas=yes ;;
221   ppc-*-elf*)           obj_format=elf bfd_gas=yes ;;
222   ppc-*-netware*)       obj_format=elf emulation=ppcnw ;;
223   ppc-*-sysv4*)         obj_format=elf bfd_gas=yes ;;
224
225   sh-*-coff)            obj_format=coff ;;
226
227   ns32k-pc532-mach*)    obj_format=aout emulation=pc532 bfd_gas=yes ;;
228   ns32k-pc532-netbsd*)  obj_format=aout emulation=netbsd532 bfd_gas=yes ;;
229
230   sparc*-*-sunos4*)     obj_format=aout emulation=sun3 bfd_gas=yes ;;
231   sparc*-*-aout | sparc*-*-vxworks)
232                         obj_format=aout bfd_gas=yes ;;
233   sparc*-*-coff)        obj_format=coff bfd_gas=yes ;;
234   sparc*-*-lynxos*)     obj_format=coff bfd_gas=yes emulation=lynx ;;
235   sparc*-fujitsu-none)  obj_format=aout bfd_gas=yes ;;
236   sparc*-*-elf | sparc*-*-solaris*)
237                         obj_format=elf ;;
238
239   vax-*-bsd* | vax-*-ultrix*)
240                         obj_format=aout ;;
241   vax-*-vms)            obj_format=vms ;;
242
243   z8k-*-coff | z8k-*-sim)
244                         obj_format=coff ;;
245
246   *-*-aout | *-*-scout)
247                         obj_format=aout ;;
248   *-*-nindy*)
249                         obj_format=bout ;;
250   *-*-bsd*)
251                         obj_format=aout emulation=sun3 ;;
252   *-*-generic)          obj_format=generic ;;
253   *-*-xray | *-*-hms)   obj_format=coff ;;
254   *-*-sim)              obj_format=coff ;;
255   *-*-elf | *-*-sysv4* | *-*-solaris*)
256         echo '*** Warning: GAS support for ELF format is incomplete' 1>&2
257                         obj_format=elf dev=yes ;;
258   *-*-vxworks)          obj_format=aout ;;
259   *-*-netware)          obj_format=elf ;;
260 esac
261
262 # Assign floating point type.  Most processors with FP support
263 # IEEE FP.  On those that don't support FP at all, usually IEEE
264 # is emulated.
265 case ${target_cpu} in
266   vax | tahoe ) atof=${target_cpu} ;;
267   *)                    atof=ieee ;;
268 esac
269
270 if [ ! -r ${srcdir}/config/tc-${cpu_type}.c ]; then
271   echo '*** GAS does not support target CPU' ${cpu_type}                1>&2
272   exit 1
273 fi
274
275 case "${obj_format}" in
276   "")
277       echo "*** GAS doesn't know what format to use for target" ${target} 1>&2
278       exit 1
279       ;;
280 esac
281
282 if [ ! -r ${srcdir}/config/obj-${obj_format}.c ]; then
283   echo '*** GAS does not have support for object file format' ${obj_format} 1>&2
284   exit 1
285 fi
286
287 # and target makefile frag
288
289 target_makefile_frag=config/${gas_target}.mt
290
291 case ${bfd_gas}-${obj_format} in
292   yes-coff)     need_bfd=yes ;;
293   no-coff)      need_bfd=yes extra_def="MANY_SEGMENTS" ;;
294   *-elf)        bfd_gas=yes ;;
295   *-ecoff)      bfd_gas=yes ;;
296   *-som)        bfd_gas=yes ;;
297   *)            ;;
298 esac
299
300 case ${with_bfd_assembler}-${bfd_gas} in
301   yes-yes | no-no)
302     # We didn't override user's choice.
303     ;;
304   no-yes)
305     echo '*** Use of BFD is required for ${target}; overriding config options'\
306                 1>&2
307     ;;
308   no-preferred)
309     bfd_gas=no
310     ;;
311   *-preferred)
312     bfd_gas=yes
313     ;;
314   -*)
315     # User specified nothing.
316     ;;
317 esac
318
319 reject_dev_configs=yes
320
321 case ${reject_dev_configs}-${dev} in
322   yes-yes) # Oops.
323     echo "*** GAS does not support the ${generic_target} configuration" 1>&2
324     exit 1
325     ;;
326 esac
327
328 files="config/ho-${gas_host}.h config/tc-${cpu_type}.c \
329         config/tc-${cpu_type}.h config/te-${emulation}.h \
330         config/obj-${obj_format}.h config/obj-${obj_format}.c \
331         config/atof-${atof}.c"
332
333 links="host.h targ-cpu.c targ-cpu.h targ-env.h obj-format.h obj-format.c atof-targ.c"
334
335 # post-target:
336
337 case ${bfd_gas} in
338   yes)  extra_def="$extra_def BFD_ASSEMBLER" need_bfd=yes ;;
339 esac
340
341 case ${need_bfd} in
342   yes)  bfdlib="BFDLIB=../bfd/libbfd.a"
343         all_obj_deps="$all_obj_deps ../bfd/bfd.h"
344         ;;
345   *)    bfdlib=""
346         ;;
347 esac
348
349 case "x${host}" in
350   "x${target}") cross=""                                ;;
351   *)            cross="CROSS=-DCROSS_COMPILE"           ;;
352 esac
353
354 rm -f Makefile.tem
355 echo $cross                     >  Makefile.tem
356 echo ALL_OBJ_DEPS=$all_obj_deps >> Makefile.tem
357 echo defs=$extra_def            >> Makefile.tem
358 echo $bfdlib                    >> Makefile.tem
359 echo "OPCODES_LIB=$opcodes"     >> Makefile.tem
360 cat Makefile                    >> Makefile.tem
361 mv -f Makefile.tem Makefile
362
363 # end of gas/configure.in
This page took 0.044168 seconds and 4 git commands to generate.