Initial import from FreeBSD RELENG_4:
[games.git] / gnu / usr.bin / as / configure.in
1 # This file is configure.in
2 #
3 #   Copyright (C) 1987-1992 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 is a shell script that supplies the information necessary
23 # to tailor a template configure script into the configure script
24 # appropriate for this directory.  For more information, check any
25 # existing configure script.
26
27 srctrigger=as.c
28 srcname="gas"
29 need_bfd=
30 configdirs=doc
31
32 # per-host:
33
34 gas_host=generic
35
36 case "${host_cpu}" in
37 a29k | rs6000 | vax)
38         case "${host_os}" in
39         vms*)   gas_host=vms ;;
40         *)      gas_host=${host_cpu} ;;
41         esac
42         ;;
43 mips)
44         case "${host_os}" in
45         ultrix) gas_host=decstation ;;
46         esac
47         ;;
48 i386)
49         case "${host_os}" in
50         aix*)   gas_host=i386aix ;;
51         sysv4*)
52                 gas_host=i386
53                 host_makefile_frag=config/ho-i386v4
54                 ;;
55         esac
56         ;;
57 *)
58         case "${host_os}" in
59         ansi | ultrix | hpux | sysv*)   gas_host=${host_os} ;;
60         *)
61                 case "${host_vendor}" in
62                 sun)
63                         case "${host_cpu}" in
64                         m68k)   gas_host=sun3 ;;
65                         i386)   gas_host=sun386 ;;
66                         sparc)  gas_host=sun4 ;;
67                         esac
68                         ;;
69                 esac
70                 ;;
71         esac
72         ;;
73 esac
74
75 # per-target:
76
77 # assign cpu type
78 environment=generic
79
80 cpu_type=${target_cpu}
81
82 # assign object format
83 case ${target_os} in
84 aix*)
85         case "${target_cpu}" in
86         i386)   obj_format=coff
87                 target_cpu=i386aix
88                 environment=i386aix
89                 ;;
90         esac
91         ;;
92
93 bout*) obj_format=bout ;;
94 nindy*) obj_format=bout ;;
95 bsd* | sunos*)
96         obj_format=aout
97         case "${target_cpu}" in
98         m68k)   environment=sun3 ;;
99         i386 | ns32k)
100                 case "${target_vendor}" in
101                 sequent) environment=${target_vendor} ;;
102                 esac
103         esac
104         ;;
105
106 ebmon-old)
107         obj_format=coff
108         need_bfd="$(unsubdir)/../bfd$(subdir)/libbfd.a"
109         target_cpu=ebmon29k
110         ;;
111
112 ebmon)
113         obj_format=coffbfd
114         need_bfd="$(unsubdir)/../bfd$(subdir)/libbfd.a"
115         target_cpu=ebmon29k
116         ;;
117
118 generic) obj_format=generic ;;
119
120 hms)
121         obj_format=coffbfd
122         need_bfd="$(unsubdir)/../bfd$(subdir)/libbfd.a"
123         ;;
124
125 hpux)
126         obj_format=aout
127         environment=hpux
128         ;;
129
130 sysv32)
131         obj_format=coff
132         environment=sysv32
133         ;;
134
135 vms)
136         obj_format=vms
137         ;;
138
139 coff* | sysv*)
140         obj_format=coff
141
142         case ${target_vendor} in
143         bull)   environment=dpx2 ;;
144         sco)    environment=sco386 ;;
145         sun)    environment=sun3 ;;
146         *)
147         esac
148         ;;
149 vxworks)
150         case ${target_cpu} in
151         i960) obj_format=bout ;;
152         *) obj_format=aout ;;
153         esac
154         ;;
155 *)
156         case ${target_vendor} in
157         aout)           obj_format=aout ;;
158         bout)           obj_format=bout ;;
159         coff)
160                 obj_format=coff
161                 case ${target_cpu} in
162                 i960) environment=ic960 ;;
163                 esac
164                 ;;
165         sequent)
166                 obj_format=aout
167                 environment=sequent
168                 ;;
169         *) obj_format=aout ;;
170         esac
171         ;;
172
173 esac
174
175 # assign floating point type
176 case ${target_cpu} in
177 ns32k)  atof=ns32k ;;
178 tahoe)  atof=tahoe ;;
179 vax)    atof=vax ;;
180 *)      atof=ieee ;;
181 esac
182
183 # and target makefile frag
184
185 target_makefile_frag=config/mt-${target_cpu}
186
187 files="config/ho-${gas_host}.h config/tc-${cpu_type}.c \
188         config/tc-${cpu_type}.h config/te-${environment}.h \
189         config/obj-${obj_format}.h config/obj-${obj_format}.c \
190         config/atof-${atof}.c"
191
192 links="host.h targ-cpu.c targ-cpu.h targ-env.h obj-format.h obj-format.c atof-targ.c"
193
194 # post-target:
195
196 if [ ${target_alias} != ${host_alias} ] ; then
197         echo INTERNAL_CFLAGS=-DCROSS_COMPILE > Makefile.tem
198         cat Makefile >> Makefile.tem
199         mv Makefile.tem Makefile
200 else
201         true
202 fi
203
204 # end of gas/configure.in