xref: /openbsd/gnu/usr.bin/binutils/gas/configure.in (revision 3d8817e4)
1dnl Process this file with autoconf to produce a configure script.
2dnl
3dnl And be careful when changing it!  If you must add tests with square
4dnl brackets, be sure changequote invocations surround it.
5dnl
6dnl
7dnl v2.5 needed for --bindir et al
8AC_PREREQ(2.57)
9AC_INIT(as.h)
10
11dnl Autoconf 2.57 will find the aux dir without this.  However, unless
12dnl we specify this explicitly, automake-1.7 will assume that ylwrap is in
13dnl gas/ instead of gas/../.
14AC_CONFIG_AUX_DIR(..)
15AC_CANONICAL_SYSTEM
16AC_ISC_POSIX
17
18changequote(,)dnl
19BFD_VERSION=`sed -n -e 's/^.._INIT_AUTOMAKE.*,[ 	]*\([^ 	]*\)[ 	]*).*/\1/p' < ${srcdir}/../bfd/configure.in`
20changequote([,])dnl
21AM_INIT_AUTOMAKE(gas, ${BFD_VERSION})
22
23AM_PROG_LIBTOOL
24
25user_bfd_gas=
26AC_ARG_ENABLE(bfd-assembler,
27[  --enable-bfd-assembler  use BFD back end for writing object files],
28[case "${enableval}" in
29  yes) need_bfd=yes user_bfd_gas=yes ;;
30  no)  user_bfd_gas=no ;;
31  *)   AC_MSG_ERROR(bad value ${enableval} given for bfd-assembler option) ;;
32esac])dnl
33AC_ARG_ENABLE(targets,
34[    targets            alternative target configurations besides the primary],
35[case "${enableval}" in
36  yes | "") AC_ERROR(enable-targets option must specify target names or 'all')
37	    ;;
38  no)	    enable_targets= ;;
39  *)	    enable_targets=$enableval ;;
40esac])dnl
41AC_ARG_ENABLE(commonbfdlib,
42[  --enable-commonbfdlib   build shared BFD/opcodes/libiberty library],
43[case "${enableval}" in
44  yes) commonbfdlib=true ;;
45  no)  commonbfdlib=false ;;
46  *)   AC_MSG_ERROR([bad value ${enableval} for BFD commonbfdlib option]) ;;
47esac])dnl
48
49using_cgen=no
50
51build_warnings="-W -Wall -Wstrict-prototypes -Wmissing-prototypes"
52AC_ARG_ENABLE(build-warnings,
53[  --enable-build-warnings Enable build-time compiler warnings if gcc is used],
54[case "${enableval}" in
55  yes)	;;
56  no)	build_warnings="-w";;
57  ,*)   t=`echo "${enableval}" | sed -e "s/,/ /g"`
58        build_warnings="${build_warnings} ${t}";;
59  *,)   t=`echo "${enableval}" | sed -e "s/,/ /g"`
60        build_warnings="${t} ${build_warnings}";;
61  *)    build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
62esac
63if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
64  echo "Setting warning flags = $build_warnings" 6>&1
65fi])dnl
66WARN_CFLAGS=""
67if test "x${build_warnings}" != x -a "x$GCC" = xyes ; then
68    WARN_CFLAGS="${build_warnings}"
69fi
70AC_SUBST(WARN_CFLAGS)
71
72# Generate a header file
73AM_CONFIG_HEADER(config.h:config.in)
74
75# If we are on a DOS filesystem, we must use gdb.ini rather than
76# .gdbinit.
77case "${host}" in
78  *-*-msdos* | *-*-go32* | *-*-mingw32* | *-*-windows*)
79    GDBINIT="gdb.ini"
80    AC_CONFIG_FILES(gdb.ini:gdbinit.in)
81    ;;
82  *)
83    GDBINIT=".gdbinit"
84    AC_CONFIG_FILES(.gdbinit:gdbinit.in)
85    ;;
86esac
87AC_SUBST(GDBINIT)
88
89te_file=generic
90
91# Makefile target for installing gas in $(tooldir)/bin.
92install_tooldir=install-exec-tooldir
93
94canon_targets=""
95all_targets=no
96if test -n "$enable_targets" ; then
97  for t in `echo $enable_targets | sed 's/,/ /g'`; do
98    if test $t = "all"; then
99      all_targets=yes
100      continue
101    fi
102    result=`$ac_config_sub $t 2>/dev/null`
103    if test -n "$result" ; then
104      canon_targets="$canon_targets $result"
105#    else
106#      # Permit "all", etc.  We don't support it yet though.
107#      canon_targets="$canon_targets $t"
108    fi
109  done
110  GAS_UNIQ(canon_targets)
111fi
112
113emulations=""
114
115for this_target in $target $canon_targets ; do
116
117changequote(,)dnl
118    eval `echo $this_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/cpu=\1 vendor=\2 os=\3/'`
119changequote([,])dnl
120
121    # check for architecture variants
122    arch=
123    endian=
124    case ${cpu} in
125      am33_2.0)		cpu_type=mn10300 endian=little ;;
126      alpha*)		cpu_type=alpha ;;
127      arm*b|xscale*b|strongarm*b) cpu_type=arm endian=big ;;
128      arm*|xscale*|strongarm*)    cpu_type=arm endian=little ;;
129      c4x*)		cpu_type=tic4x ;;
130      hppa*)		cpu_type=hppa ;;
131changequote(,)dnl
132      i[3-7]86)		cpu_type=i386 arch=i386;;
133      x86_64)		cpu_type=i386 arch=x86_64;;
134      ia64)		cpu_type=ia64 ;;
135      ip2k)             cpu_type=ip2k endian=big ;;
136      iq2000)           cpu_type=iq2000 endian=big ;;
137      m6811|m6812|m68hc12) cpu_type=m68hc11 ;;
138      m680[012346]0)	cpu_type=m68k ;;
139changequote([,])dnl
140      m68008)		cpu_type=m68k ;;
141      m683??)		cpu_type=m68k ;;
142      m5200)		cpu_type=m68k ;;
143      m8*)		cpu_type=m88k ;;
144      mips*el)		cpu_type=mips endian=little ;;
145      mips*)		cpu_type=mips endian=big ;;
146      or32*)		cpu_type=or32 endian=big ;;
147      pjl*)		cpu_type=pj endian=little ;;
148      pj*)		cpu_type=pj endian=big ;;
149      powerpc*le*)	cpu_type=ppc endian=little ;;
150      powerpc*)		cpu_type=ppc endian=big ;;
151      rs6000*)		cpu_type=ppc ;;
152      s390x*)		cpu_type=s390 arch=s390x ;;
153      s390*)		cpu_type=s390 arch=s390 ;;
154      sh5*)		cpu_type=sh64 endian=big ;;
155      sh5le*)		cpu_type=sh64 endian=little ;;
156      sh64*)            cpu_type=sh64 endian=big ;;
157      sh64le*)		cpu_type=sh64 endian=little ;;
158      sh*le)		cpu_type=sh endian=little ;;
159      sh*)		cpu_type=sh endian=big ;;
160      sparclite*)	cpu_type=sparc arch=sparclite ;;
161      sparclet*)	cpu_type=sparc arch=sparclet ;;
162      sparc64*)		cpu_type=sparc arch=v9-64 ;;
163      sparc86x*)	cpu_type=sparc arch=sparc86x  ;;
164      sparc*)		cpu_type=sparc arch=sparclite ;; # ??? See tc-sparc.c.
165      v850*)		cpu_type=v850 ;;
166      xtensa*)		cpu_type=xtensa arch=xtensa ;;
167      m32r)             cpu_type=m32r target_cpu=m32r endian=big ;;
168      m32rle)           cpu_type=m32r target_cpu=m32r endian=little ;;
169      *)		cpu_type=${cpu} ;;
170    esac
171
172    if test ${this_target} = $target ; then
173      target_cpu_type=${cpu_type}
174    elif test ${target_cpu_type} != ${cpu_type} ; then
175      continue
176    fi
177
178    generic_target=${cpu_type}-$vendor-$os
179    dev=no
180    bfd_gas=no
181    em=generic
182
183    # assign object format
184    case ${generic_target} in
185      a29k-*-coff)			fmt=coff ;;
186      a29k-amd-udi)			fmt=coff ;;
187      a29k-amd-ebmon)			fmt=coff ;;
188      a29k-nyu-sym1)			fmt=coff ;;
189      a29k-*-rtems*)			fmt=coff ;;
190      a29k-*-vxworks*)			fmt=coff ;;
191
192      alpha*-*-*vms*)			fmt=evax ;;
193      alpha*-*-netware*)		fmt=ecoff ;;
194      alpha*-*-osf*)			fmt=ecoff ;;
195      alpha*-*-linuxecoff*)		fmt=ecoff ;;
196      alpha*-*-linux-gnu*)		fmt=elf em=linux ;;
197      alpha*-*-netbsd*)			fmt=elf em=nbsd ;;
198      alpha*-*-openbsd*)		fmt=elf em=obsd ;;
199
200      # cpu_type for am33_2.0 is set to mn10300
201      mn10300-*-linux*)			fmt=elf bfd_gas=yes em=linux ;;
202
203      arc-*-elf*)			fmt=elf ;;
204
205      arm-*-aout)			fmt=aout ;;
206      arm-*-coff | thumb-*-coff)	fmt=coff ;;
207      arm-*-rtems* | thumb-*-rtems*)	fmt=elf ;;
208      arm-*-elf | thumb-*-elf)		fmt=elf ;;
209      arm-*-kaos*)			fmt=elf ;;
210      arm*-*-conix*)			fmt=elf ;;
211      arm-*-linux*aout*)		fmt=aout em=linux ;;
212      arm*-*-linux-gnu*)		fmt=elf  em=linux ;;
213      arm*-*-uclinux*)			fmt=elf  em=linux ;;
214      arm-*-netbsdelf*)                 fmt=elf  em=nbsd ;;
215      arm-*-netbsd*)			fmt=aout em=nbsd ;;
216      arm-*-openbsd*)			fmt=elf  em=obsd ;;
217      arm-**-nto*)			fmt=elf ;;
218      arm-*-oabi | thumb-*-oabi)	fmt=elf ;;
219      arm-epoc-pe | thumb-epoc-pe)	fmt=coff em=epoc-pe ;;
220      arm-wince-pe | arm-*-wince)       fmt=coff em=wince-pe ;;
221      arm-*-pe | thumb-*-pe)		fmt=coff em=pe ;;
222      arm-*-riscix*)			fmt=aout em=riscix ;;
223
224      avr-*-*)				fmt=elf ;;
225
226      cris-*-linux-gnu*)		fmt=multi bfd_gas=yes em=linux ;;
227      cris-*-*)				fmt=multi bfd_gas=yes ;;
228
229      d10v-*-*)				fmt=elf ;;
230      d30v-*-*)				fmt=elf ;;
231      dlx-*-*)				fmt=elf ;;
232
233      fr30-*-*)				fmt=elf ;;
234      frv-*-*linux*)			fmt=elf em=linux;;
235      frv-*-*)				fmt=elf ;;
236
237      hppa-*-linux*)	case ${cpu} in
238			    hppa*64*)	fmt=elf em=hppalinux64;;
239			    hppa*)	fmt=elf em=linux;;
240			esac ;;
241      hppa-*-*elf*)			fmt=elf em=hppa ;;
242      hppa-*-lites*)			fmt=elf em=hppa ;;
243      hppa-*-netbsd*)			fmt=elf em=nbsd ;;
244      hppa-*-openbsd*)	case ${cpu} in
245			    hppa64)	fmt=elf em=obsdhppa64 ;;
246			    hppa)	fmt=elf em=obsd ;;
247			esac ;;
248      hppa-*-osf*)			fmt=som em=hppa ;;
249      hppa-*-rtems*)			fmt=elf em=hppa ;;
250      hppa-*-hpux11*)	case ${cpu} in
251			    hppa*64*)	fmt=elf em=hppa64 ;;
252			    hppa*)	fmt=som em=hppa ;;
253			esac ;;
254      hppa-*-hpux*)			fmt=som em=hppa ;;
255      hppa-*-mpeix*)			fmt=som em=hppa ;;
256      hppa-*-bsd*)			fmt=som em=hppa ;;
257      hppa-*-hiux*)			fmt=som em=hppa ;;
258
259      h8300-*-rtems*)			fmt=coff ;;
260      h8300-*-coff)			fmt=coff ;;
261      h8300-*-elf)			fmt=elf ;;
262      h8500-*-rtems*)			fmt=coff ;;
263      h8500-*-coff)			fmt=coff ;;
264
265      i370-*-elf* | i370-*-linux*)	fmt=elf ;;
266      i386-ibm-aix*)			fmt=coff em=i386aix ;;
267      i386-sequent-bsd*)		fmt=aout em=dynix ;;
268      i386-*-beospe*)			fmt=coff em=pe ;;
269      i386-*-beos*)			fmt=elf ;;
270      i386-*-coff)			fmt=coff ;;
271      i386-*-elf)			fmt=elf ;;
272      i386-*-kaos*)			fmt=elf ;;
273      i386-*-bsd*)			fmt=aout em=386bsd ;;
274      i386-*-netbsd0.8)			fmt=aout em=386bsd ;;
275      i386-*-netbsdpe*)			fmt=coff em=pe ;;
276      i386-*-netbsd*-gnu* | \
277      i386-*-knetbsd*-gnu | \
278      i386-*-netbsdelf*)		fmt=elf em=nbsd ;;
279      i386-*-netbsd*)	case ${cpu} in
280			    x86_64)	fmt=elf em=nbsd ;;
281			    *)		fmt=aout em=nbsd ;;
282			esac ;;
283changequote(,)dnl
284      i386-*-openbsd*)			em=obsd bfd_gas=yes
285			case ${cpu} in
286			    x86_64)	fmt=elf ;;
287			    *) case ${os} in
288				openbsd[0-2].* | openbsd3.[0-2])
289					fmt=aout ;;
290			       *)
291					fmt=elf ;;
292			       esac
293			esac ;;
294changequote([,])dnl
295      i386-*-linux*aout*)		fmt=aout em=linux ;;
296      i386-*-linux*oldld)		fmt=aout em=linux ;;
297      i386-*-linux*coff*)		fmt=coff em=linux ;;
298      i386-*-linux-gnu*)		fmt=elf em=linux ;;
299      x86_64-*-linux-gnu*)		fmt=elf em=linux ;;
300      i386-*-lynxos*)			fmt=coff em=lynx ;;
301changequote(,)dnl
302      i386-*-sysv[45]*)			fmt=elf ;;
303      i386-*-solaris*)			fmt=elf ;;
304      i386-*-freebsdaout*)		fmt=aout em=386bsd ;;
305      i386-*-freebsd[12].*)		fmt=aout em=386bsd ;;
306      i386-*-freebsd[12])		fmt=aout em=386bsd ;;
307changequote([,])dnl
308      i386-*-freebsd* | i386-*-kfreebsd*-gnu)
309					fmt=elf em=freebsd ;;
310      i386-*-sysv*)			fmt=coff ;;
311      i386-*-sco3.2v5*coff)		fmt=coff ;;
312      i386-*-isc*)			fmt=coff ;;
313      i386-*-sco3.2v5*)			fmt=elf
314	  if test ${this_target} = $target; then
315	    AC_DEFINE(SCO_ELF, 1, [Define if defaulting to ELF on SCO 5.])
316	  fi ;;
317      i386-*-sco3.2*)			fmt=coff ;;
318      i386-*-vsta)			fmt=aout ;;
319      i386-*-msdosdjgpp* \
320      | i386-*-go32* \
321      | i386-go32-rtems*)		fmt=coff em=go32
322	    AC_DEFINE(STRICTCOFF, 1, [Using strict COFF?]) ;;
323      i386-*-rtemself*)			fmt=elf ;;
324      i386-*-rtemscoff*)		fmt=coff ;;
325      i386-*-rtems*)			fmt=elf ;;
326      i386-*-gnu*)			fmt=elf ;;
327      i386-*-mach*)			fmt=aout em=mach ;;
328      i386-*-msdos*)			fmt=aout ;;
329      i386-*-moss*)			fmt=elf ;;
330      i386-*-pe)			fmt=coff em=pe ;;
331      i386-*-cygwin*)			fmt=coff em=pe ;;
332      i386-*-interix*)			fmt=coff em=interix ;;
333      i386-*-mingw32*)			fmt=coff em=pe ;;
334      i386-*-nto-qnx*)			fmt=elf ;;
335      i386-*-*nt*)			fmt=coff em=pe ;;
336      i386-*-chaos)			fmt=elf ;;
337
338      i860-*-*)				fmt=elf endian=little
339		AC_MSG_WARN(GAS support for ${generic_target} is preliminary and a work in progress) ;;
340      i960-*-bout)			fmt=bout ;;
341      i960-*-coff)			fmt=coff em=ic960 ;;
342      i960-*-rtems*)			fmt=coff em=ic960 ;;
343      i960-*-nindy*)			fmt=bout ;;
344      i960-*-vxworks5.0)		fmt=bout ;;
345      i960-*-vxworks5.*)		fmt=coff em=ic960 ;;
346      i960-*-vxworks*)			fmt=bout ;;
347      i960-*-elf*)			fmt=elf ;;
348
349      ia64-*-elf*)			fmt=elf ;;
350      ia64-*-aix*)			fmt=elf em=ia64aix ;;
351      ia64-*-linux-gnu*)		fmt=elf em=linux ;;
352      ia64-*-hpux*)			fmt=elf em=hpux ;;
353      ia64-*-netbsd*)			fmt=elf em=nbsd ;;
354
355      ip2k-*-*)				fmt=elf ;;
356
357      iq2000-*-elf)         		fmt=elf bfd_gas=yes ;;
358
359      m32r-*-elf*)			fmt=elf ;;
360      m32r-*-linux*)			fmt=elf em=linux;;
361
362      m68hc11-*-* | m6811-*-*)		fmt=elf ;;
363      m68hc12-*-* | m6812-*-*)		fmt=elf ;;
364
365      m68k-*-vxworks*)			fmt=aout em=sun3 ;;
366      m68k-ericsson-ose)		fmt=aout em=sun3 ;;
367      m68k-*-sunos*)			fmt=aout em=sun3 ;;
368      m68k-motorola-sysv*)		fmt=coff em=delta ;;
369      m68k-bull-sysv3*)			fmt=coff em=dpx2 ;;
370      m68k-apollo-*)			fmt=coff em=apollo ;;
371      m68k-*-elf*)			fmt=elf ;;
372      m68k-*-sysv4*)			fmt=elf em=svr4 ;;
373      m68k-*-sysv*)			fmt=coff ;;
374      m68k-*-coff | m68k-*-rtemscoff*)	fmt=coff ;;
375      m68k-*-rtems*)			fmt=elf ;;
376      m68k-*-hpux*)			fmt=hp300 em=hp300 ;;
377      m68k-*-linux*aout*)		fmt=aout em=linux ;;
378      m68k-*-linux-gnu*)		fmt=elf em=linux ;;
379      m68k-*-uclinux*)			fmt=elf ;;
380      m68k-*-gnu*)			fmt=elf ;;
381      m68k-*-lynxos*)			fmt=coff em=lynx ;;
382      m68k-*-netbsdelf*)		fmt=elf em=nbsd ;;
383      m68k-*-netbsd*)			fmt=aout em=nbsd bfd_gas=yes ;;
384      m68k-*-openbsd*)			fmt=aout em=obsd bfd_gas=yes ;;
385      m68k-apple-aux*)			fmt=coff em=aux ;;
386      m68k-*-psos*)			fmt=elf em=psos;;
387
388      m88k-motorola-sysv3*)		fmt=coff em=delt88 ;;
389      m88k-*-coff*)			fmt=coff ;;
390
391      mcore-*-elf)			fmt=elf ;;
392      mcore-*-pe)			fmt=coff em=pe bfd_gas=yes ;;
393
394      # don't change em like *-*-bsd does
395      mips-sony-bsd*)			fmt=ecoff ;;
396      mips-*-bsd*)
397	    AC_MSG_ERROR(Unknown vendor for mips-bsd configuration.) ;;
398      mips-*-ultrix*)			fmt=ecoff endian=little ;;
399      mips-*-osf*)			fmt=ecoff endian=little ;;
400      mips-*-ecoff*)			fmt=ecoff ;;
401      mips-*-pe*)			fmt=coff endian=little em=pe ;;
402      mips-*-irix6*)			fmt=elf em=irix ;;
403      mips-*-irix5*)			fmt=elf em=irix ;;
404      mips-*-irix*)			fmt=ecoff em=irix ;;
405      mips-*-lnews*)			fmt=ecoff em=lnews ;;
406      mips-*-riscos*)			fmt=ecoff ;;
407      mips*-*-linux*)			fmt=elf em=tmips ;;
408      mips-*-sysv4*MP* | mips-*-gnu*)	fmt=elf em=tmips ;;
409      mips-*-sysv*)			fmt=ecoff ;;
410      mips-*-elf* | mips-*-rtems*)	fmt=elf ;;
411      mips-*-netbsd*)			fmt=elf ;;
412      mips-*-openbsd*)			fmt=elf em=tmips ;;
413
414      mmix-*-*)				fmt=elf ;;
415      mn10200-*-*)			fmt=elf ;;
416      mn10300-*-*)			fmt=elf ;;
417      msp430-*-*)			fmt=elf ;;
418      openrisc-*-*)			fmt=elf ;;
419      or32-*-rtems*)			fmt=elf ;;
420      or32-*-coff)			fmt=coff ;;
421      or32-*-elf)			fmt=elf ;;
422      pj*)				fmt=elf ;;
423
424      ppc-*-pe | ppc-*-cygwin*)		fmt=coff em=pe ;;
425      ppc-*-winnt*)			fmt=coff em=pe ;;
426changequote(,)dnl
427      ppc-*-aix5.[01])			fmt=coff em=aix5 ;;
428changequote([,])dnl
429      ppc-*-aix5.*)			fmt=coff em=aix5
430      	AC_DEFINE(AIX_WEAK_SUPPORT, 1,
431		  [Define if using AIX 5.2 value for C_WEAKEXT.])
432      ;;
433      ppc-*-aix*)			fmt=coff ;;
434      ppc-*-beos*)			fmt=coff ;;
435      ppc-*-netbsd* | ppc-*-elf*)	fmt=elf ;;
436      ppc-*-openbsd*)			fmt=elf em=obsd ;;
437      ppc-*-eabi* | ppc-*-sysv4*)	fmt=elf ;;
438      ppc-*-linux-gnu*)			fmt=elf em=linux
439	    case "$endian" in
440		big)  ;;
441		*)    AC_MSG_ERROR(GNU/Linux must be configured big endian) ;;
442	    esac ;;
443      ppc-*-solaris*)			fmt=elf
444	    if test ${this_target} = $target; then
445		AC_DEFINE(TARGET_SOLARIS_COMMENT, 1,
446			  [Define if default target is PowerPC Solaris.])
447	    fi
448	    if test x${endian} = xbig; then
449		AC_MSG_ERROR(Solaris must be configured little endian)
450	    fi ;;
451      ppc-*-rtems*)			fmt=elf ;;
452      ppc-*-macos* | ppc-*-mpw*)	fmt=coff em=macos ;;
453      ppc-*-netware*)			fmt=elf em=ppcnw ;;
454      ppc-**-nto*)			fmt=elf ;;
455      ppc-*-kaos*)			fmt=elf ;;
456
457      s390x-*-linux-gnu*)		fmt=elf em=linux ;;
458      s390-*-linux-gnu*)		fmt=elf em=linux ;;
459
460      sh*-*-linux*)			fmt=elf em=linux
461	    case ${cpu} in
462		sh*eb)	endian=big ;;
463		*)	endian=little ;;
464	    esac ;;
465      sh5*-*-netbsd*)			fmt=elf em=nbsd ;;
466      sh64*-*-netbsd*)			fmt=elf em=nbsd ;;
467      sh*-*-netbsdelf*)			fmt=elf em=nbsd ;;
468      sh*-*-openbsd*)			fmt=elf em=obsd endian=little ;;
469      sh-*-elf*)			fmt=elf ;;
470      sh-*-coff*)			fmt=coff ;;
471      sh-*-nto*)			fmt=elf ;;
472      sh-*-pe*)				fmt=coff em=pe bfd_gas=yes endian=little ;;
473      sh-*-rtemscoff*)			fmt=coff ;;
474      sh-*-rtems*)			fmt=elf ;;
475      sh-*-kaos*)			fmt=elf ;;
476      shle*-*-kaos*)			fmt=elf ;;
477      sh64-*-elf*)			fmt=elf ;;
478
479      ns32k-pc532-mach*)		fmt=aout em=pc532mach ;;
480      ns32k-pc532-ux*)			fmt=aout em=pc532mach ;;
481      ns32k-pc532-lites*)		fmt=aout em=nbsd532 ;;
482      ns32k-*-netbsd*)			fmt=aout em=nbsd532 ;;
483
484      sparc-*-rtemsaout*)		fmt=aout ;;
485      sparc-*-rtemself*)		fmt=elf ;;
486      sparc-*-rtems*)			fmt=elf ;;
487      sparc-*-sunos4*)			fmt=aout em=sun3 ;;
488      sparc-*-aout | sparc*-*-vxworks*)	fmt=aout em=sparcaout ;;
489      sparc-*-coff)			fmt=coff ;;
490      sparc-*-linux*aout*)		fmt=aout em=linux ;;
491      sparc-*-linux-gnu*)		fmt=elf em=linux ;;
492      sparc-*-lynxos*)			fmt=coff em=lynx ;;
493      sparc-fujitsu-none)		fmt=aout ;;
494      sparc-*-elf)			fmt=elf ;;
495      sparc-*-sysv4*)			fmt=elf ;;
496      sparc-*-solaris*)			fmt=elf ;;
497      sparc-*-netbsdelf*)		fmt=elf em=nbsd ;;
498      sparc-*-netbsd*)	case ${cpu} in
499			    sparc64)	fmt=elf em=nbsd ;;
500			    *)		fmt=aout em=nbsd ;;
501			esac ;;
502changequote(,)dnl
503      sparc-*-openbsd*)			em=obsd bfd_gas=yes
504			case ${os} in
505			    openbsd[0-2].* | openbsd3.[0-1])
506					fmt=aout ;;
507			    *)
508					fmt=elf ;;
509			esac ;;
510changequote([,])dnl
511      sparc64-*-openbsd*) em=obsd bfd_gas=yes fmt=elf ;;
512      strongarm-*-coff)			fmt=coff ;;
513      strongarm-*-elf)			fmt=elf ;;
514      strongarm-*-kaos*)		fmt=elf ;;
515      xscale-*-coff)			fmt=coff ;;
516      xscale-*-elf)			fmt=elf ;;
517
518      tic30-*-*aout*)			fmt=aout bfd_gas=yes ;;
519      tic30-*-*coff*)			fmt=coff bfd_gas=yes ;;
520      tic4x-*-* | c4x-*-*)              fmt=coff bfd_gas=yes ;;
521      tic54x-*-* | c54x*-*-*)		fmt=coff bfd_gas=yes need_libm=yes;;
522      tic80-*-*)			fmt=coff ;;
523
524      v850-*-*)				fmt=elf ;;
525      v850e-*-*)			fmt=elf ;;
526      v850ea-*-*)			fmt=elf ;;
527
528      vax-*-netbsdelf*)			fmt=elf em=nbsd ;;
529      vax-*-netbsd*)			fmt=aout em=nbsd ;;
530      vax-*-bsd* | vax-*-ultrix*)	fmt=aout ;;
531      vax-*-linux-gnu*)			fmt=elf em=linux bfd_gas=yes ;;
532      vax-*-vms)			fmt=vms ;;
533
534      w65-*-*)				fmt=coff ;;
535
536      xstormy16-*-*)			fmt=elf ;;
537
538      xtensa-*-*)			fmt=elf ;;
539
540      z8k-*-coff | z8k-*-sim)		fmt=coff ;;
541
542      *-*-aout | *-*-scout)		fmt=aout ;;
543      *-*-freebsd* | *-*-kfreebsd*-gnu)	fmt=elf em=freebsd ;;
544      *-*-nindy*)			fmt=bout ;;
545      *-*-bsd*)				fmt=aout em=sun3 ;;
546      *-*-generic)			fmt=generic ;;
547      *-*-xray | *-*-hms)		fmt=coff ;;
548      *-*-sim)				fmt=coff ;;
549      *-*-elf | *-*-sysv4* | *-*-solaris*) fmt=elf dev=yes ;;
550      *-*-aros*)			fmt=elf em=linux bfd_gas=yes ;;
551      *-*-vxworks | *-*-windiss)	fmt=elf ;;
552      *-*-netware)			fmt=elf ;;
553    esac
554
555    if test ${this_target} = $target ; then
556      endian_def=
557      if test x${endian} = xbig; then
558	endian_def=1
559      elif test x${endian} = xlittle; then
560	endian_def=0
561      fi
562      if test x${endian_def} != x; then
563	AC_DEFINE_UNQUOTED(TARGET_BYTES_BIG_ENDIAN, $endian_def,
564			   [Define as 1 if big endian.])
565      fi
566    fi
567
568    case ${cpu_type}-${fmt} in
569	alpha*-* | arm-* | i386-* | ia64*-* | mips-* | ns32k-* \
570		| pdp11-* | ppc-* | sparc-* | strongarm-* | xscale-* \
571		| *-elf | *-ecoff | *-som)
572	    bfd_gas=yes ;;
573    esac
574
575# Other random stuff.
576
577    case ${cpu_type} in
578      mips)
579	# Set mips_cpu to the name of the default CPU.
580	case ${target_cpu} in
581	  mips | mipsbe | mipseb | mipsle | mipsel | mips64 | mips64el)
582	    mips_cpu=from-abi
583	    ;;
584	  mipsisa32 | mipsisa32el)
585	    mips_cpu=mips32
586	    ;;
587	  mipsisa32r2 | mipsisa32r2el)
588	    mips_cpu=mips32r2
589	    ;;
590	  mipsisa64 | mipsisa64el)
591	    mips_cpu=mips64
592	    ;;
593	  mipsisa64r2 | mipsisa64r2el)
594	    mips_cpu=mips64r2
595	    ;;
596	  mipstx39 | mipstx39el)
597	    mips_cpu=r3900
598	    ;;
599	  mips64vr | mips64vrel)
600	    mips_cpu=vr4100
601	    ;;
602	  mipsisa32r2* | mipsisa64r2*)
603changequote(,)dnl
604	    mips_cpu=`echo $target_cpu | sed -e 's/[a-z]*..r2//' -e 's/el$//'`
605changequote([,])dnl
606	    ;;
607	  mips64* | mipsisa64* | mipsisa32*)
608changequote(,)dnl
609	    mips_cpu=`echo $target_cpu | sed -e 's/[a-z]*..//' -e 's/el$//'`
610changequote([,])dnl
611	    ;;
612	  *)
613	    AC_ERROR($target_cpu isn't a supported MIPS CPU name)
614	    ;;
615	esac
616	# See whether it's appropriate to set E_MIPS_ABI_O32 for o32
617	# binaries.  It's a GNU extension that some OSes don't understand.
618	# The value only matters on ELF targets.
619	case ${target} in
620	  *-*-irix*)
621	    use_e_mips_abi_o32=0
622	    ;;
623	  *)
624	    use_e_mips_abi_o32=1
625	    ;;
626	esac
627	# Decide whether to generate 32-bit or 64-bit code by default.
628	# Used to resolve -march=from-abi when an embedded ABI is selected.
629	case ${target} in
630	  mips64*-*-* | mipsisa64*-*-*)
631	    mips_default_64bit=1
632	    ;;
633	  *)
634	    mips_default_64bit=0
635	    ;;
636	esac
637	# Decide which ABI to target by default.
638	case ${target} in
639	  mips64*-linux* | mips-sgi-irix6*)
640	    mips_default_abi=N32_ABI
641	    ;;
642	  mips*-linux*)
643	    mips_default_abi=O32_ABI
644	    ;;
645	  mips64*-openbsd*)
646	    mips_default_abi=N64_ABI
647	    ;;
648	  *)
649	    mips_default_abi=NO_ABI
650	    ;;
651	esac
652	AC_DEFINE_UNQUOTED(MIPS_CPU_STRING_DEFAULT, "$mips_cpu",
653			   [Default CPU for MIPS targets. ])
654	AC_DEFINE_UNQUOTED(USE_E_MIPS_ABI_O32, $use_e_mips_abi_o32,
655			   [Allow use of E_MIPS_ABI_O32 on MIPS targets. ])
656	AC_DEFINE_UNQUOTED(MIPS_DEFAULT_64BIT, $mips_default_64bit,
657			   [Generate 64-bit code by default on MIPS targets. ])
658	AC_DEFINE_UNQUOTED(MIPS_DEFAULT_ABI, $mips_default_abi,
659			   [Choose a default ABI for MIPS targets. ])
660	;;
661    esac
662
663    # Do we need the opcodes library?
664    case ${cpu_type} in
665      vax | i386 | tic30)
666	;;
667
668      *)
669	need_opcodes=yes
670
671	case "${enable_shared}" in
672	yes) shared_opcodes=true ;;
673	*opcodes*) shared_opcodes=true ;;
674	*) shared_opcodes=false ;;
675	esac
676	if test "${shared_opcodes}" = "true"; then
677	  # A shared libopcodes must be linked against libbfd.
678	  need_bfd=yes
679	fi
680	;;
681    esac
682
683    # Any other special object files needed ?
684    case ${cpu_type} in
685      fr30 | ip2k | iq2000 | m32r | openrisc)
686	using_cgen=yes
687	;;
688
689      frv)
690	using_cgen=yes
691	;;
692      m68k)
693	case ${extra_objects} in
694	*m68k-parse.o*) ;;
695	*) extra_objects="$extra_objects m68k-parse.o" ;;
696	esac
697	;;
698
699      mips)
700	echo ${extra_objects} | grep -s "itbl-parse.o"
701	if test $? -ne 0 ; then
702	  extra_objects="$extra_objects itbl-parse.o"
703	fi
704
705	echo ${extra_objects} | grep -s "itbl-lex.o"
706	if test $? -ne 0 ; then
707	  extra_objects="$extra_objects itbl-lex.o"
708	fi
709
710	echo ${extra_objects} | grep -s "itbl-ops.o"
711	if test $? -ne 0 ; then
712	  extra_objects="$extra_objects itbl-ops.o"
713	fi
714	;;
715
716      i386 | s390 | sparc)
717	if test $this_target = $target ; then
718	  AC_DEFINE_UNQUOTED(DEFAULT_ARCH, "${arch}", [Default architecture.])
719	fi
720	;;
721
722      xstormy16)
723	using_cgen=yes
724	;;
725
726      xtensa)
727	echo ${extra_objects} | grep -s "xtensa-relax.o"
728	if test $? -ne 0 ; then
729	  extra_objects="$extra_objects xtensa-relax.o"
730	fi
731	;;
732
733      *)
734	;;
735    esac
736
737    if test $using_cgen = yes ; then
738	case "x${extra_objects}" in
739	*cgen.o*) ;;
740	*) extra_objects="$extra_objects cgen.o" ;;
741	esac
742    fi
743
744# See if we really can support this configuration with the emulation code.
745
746    if test $this_target = $target ; then
747      primary_bfd_gas=$bfd_gas
748      obj_format=$fmt
749      te_file=$em
750
751      if test $bfd_gas = no ; then
752	# Can't support other configurations this way.
753	break
754      fi
755    elif test $bfd_gas = no ; then
756      # Can't support this configuration.
757      break
758    fi
759
760# From target name and format, produce a list of supported emulations.
761
762    case ${generic_target}-${fmt} in
763      mips-*-irix5*-*)	emulation="mipsbelf mipslelf mipself mipsbecoff mipslecoff mipsecoff" ;;
764      mips*-*-linux*-*) case "$endian" in
765			big)	emulation="mipsbelf mipslelf mipself" ;;
766			*)	emulation="mipslelf mipsbelf mipself" ;;
767			esac ;;
768      mips-*-lnews*-ecoff) ;;
769      mips-*-*-ecoff)	case "$endian" in
770			big)	emulation="mipsbecoff mipslecoff mipsecoff" ;;
771			*)	emulation="mipslecoff mipsbecoff mipsecoff" ;;
772			esac ;;
773      mips-*-*-elf)	case "$endian" in
774			big)	emulation="mipsbelf mipslelf mipself" ;;
775			*)	emulation="mipslelf mipsbelf mipself" ;;
776			esac ;;
777      mips-*-sysv4*MP*-*) emulation="mipsbelf mipslelf mipself mipsbecoff mipslecoff mipsecoff" ;;
778      # i386-pc-pe-coff != i386-pc-coff.
779      i386-*-pe-coff)	;;
780      # Uncommenting the next line will turn on support for i386 AOUT
781      # for the default linux configuration
782      # i386-*-linux*-elf) emulation="i386elf i386aout" ;;
783      #
784      i386-*-aout)	emulation="i386aout" ;;
785      i386-*-coff)	emulation="i386coff" ;;
786      i386-*-elf)	emulation="i386elf" ;;
787
788      # Always all formats.  The first stated emulation becomes the default.
789      cris-*-*aout*)	emulation="crisaout criself" ;;
790      cris-*-*)		emulation="criself crisaout" ;;
791    esac
792
793    emulations="$emulations $emulation"
794
795done
796
797# Turn on all targets if possible
798if test ${all_targets} = "yes"; then
799  case ${target_cpu_type} in
800  i386)
801    case ${obj_format} in
802    aout)
803      emulations="$emulations i386coff i386elf"
804      ;;
805    coff)
806      emulations="$emulations i386aout i386elf"
807    ;;
808    elf)
809      emulations="$emulations i386aout i386coff"
810      ;;
811    esac
812  ;;
813  esac
814fi
815
816# Assign floating point type.  Most processors with FP support
817# IEEE FP.  On those that don't support FP at all, usually IEEE
818# is emulated.
819case ${target_cpu} in
820  vax | tahoe )	atof=${target_cpu} ;;
821  pdp11)	atof=vax ;;
822  *)		atof=ieee ;;
823esac
824
825case "${obj_format}" in
826  "") AC_MSG_ERROR(GAS does not know what format to use for target ${target}) ;;
827esac
828
829# Unfortunately the cpu in cpu-opc.h file isn't always $(TARGET_CPU).
830cgen_cpu_prefix=""
831if test $using_cgen = yes ; then
832  case ${target_cpu} in
833    *) cgen_cpu_prefix=${target_cpu} ;;
834  esac
835  AC_SUBST(cgen_cpu_prefix)
836  AC_DEFINE(USING_CGEN, 1, [Using cgen code?])
837fi
838
839dnl
840dnl Make sure the desired support files exist.
841dnl
842
843if test ! -r ${srcdir}/config/tc-${target_cpu_type}.c; then
844  AC_MSG_ERROR(GAS does not support target CPU ${target_cpu_type})
845fi
846
847if test ! -r ${srcdir}/config/obj-${obj_format}.c; then
848  AC_MSG_ERROR(GAS does not have support for object file format ${obj_format})
849fi
850
851case ${user_bfd_gas}-${primary_bfd_gas} in
852  yes-yes | no-no)
853    # We didn't override user's choice.
854    ;;
855  no-yes)
856    AC_MSG_WARN(Use of BFD is required for ${target}; overriding config options.)
857    ;;
858  no-preferred)
859    primary_bfd_gas=no
860    ;;
861  *-preferred)
862    primary_bfd_gas=yes
863    ;;
864  yes-*)
865    primary_bfd_gas=yes
866    ;;
867  -*)
868    # User specified nothing.
869    ;;
870esac
871
872# Some COFF configurations want these random other flags set.
873case ${obj_format} in
874  coff)
875    case ${target_cpu_type} in
876      i386) AC_DEFINE(I386COFF, 1, [Using i386 COFF?]) ;;
877      m68k) AC_DEFINE(M68KCOFF, 1, [Using m68k COFF?]) ;;
878      m88k) AC_DEFINE(M88KCOFF, 1, [Using m88k COFF?]) ;;
879    esac
880    ;;
881esac
882
883# Getting this done right is going to be a bitch.  Each configuration specified
884# with --enable-targets=... should be checked for environment, format, cpu, and
885# bfd_gas setting.
886#
887# For each configuration, the necessary object file support code must be linked
888# in.  This might be only one, it might be up to four.  The necessary emulation
889# code needs to be provided, too.
890#
891# And then there's "--enable-targets=all"....
892#
893# For now, just always do it for MIPS ELF or ECOFF configurations.  Sigh.
894
895formats="${obj_format}"
896emfiles=""
897EMULATIONS=""
898GAS_UNIQ(emulations)
899for em in . $emulations ; do
900  case $em in
901    .)	continue ;;
902    mipsbelf | mipslelf | mipself)
903	fmt=elf   file=mipself ;;
904    mipsbecoff | mipslecoff | mipsecoff)
905	fmt=ecoff file=mipsecoff ;;
906    *coff)
907	fmt=coff  file=$em ;;
908    *aout)
909	fmt=aout file=$em ;;
910    *elf)
911	fmt=elf file=$em ;;
912  esac
913  formats="$formats $fmt"
914  emfiles="$emfiles e-$file.o"
915  EMULATIONS="$EMULATIONS &$em,"
916done
917GAS_UNIQ(formats)
918GAS_UNIQ(emfiles)
919if test `set . $formats ; shift ; echo $#` -gt 1 ; then
920  for fmt in $formats ; do
921    case $fmt in
922      aout)	AC_DEFINE(OBJ_MAYBE_AOUT, 1,    [a.out support?])   ;;
923      bout)	AC_DEFINE(OBJ_MAYBE_BOUT, 1,    [b.out support?])   ;;
924      coff)	AC_DEFINE(OBJ_MAYBE_COFF, 1,    [COFF support?])    ;;
925      ecoff)	AC_DEFINE(OBJ_MAYBE_ECOFF, 1,   [ECOFF support?])   ;;
926      elf)	AC_DEFINE(OBJ_MAYBE_ELF, 1,     [ELF support?])     ;;
927      generic)	AC_DEFINE(OBJ_MAYBE_GENERIC, 1, [generic support?]) ;;
928      hp300)	AC_DEFINE(OBJ_MAYBE_HP300, 1,   [HP300 support?])   ;;
929      ieee)	AC_DEFINE(OBJ_MAYBE_IEEE, 1,    [IEEE support?])    ;;
930      som)	AC_DEFINE(OBJ_MAYBE_SOM, 1,     [SOM support?])     ;;
931      vms)	AC_DEFINE(OBJ_MAYBE_VMS, 1,     [VMS support?])     ;;
932    esac
933    extra_objects="$extra_objects obj-$fmt.o"
934  done
935  obj_format=multi
936fi
937if test `set . $emfiles ; shift ; echo $#` -gt 0 ; then
938  DEFAULT_EMULATION=`set . $emulations ; echo $2`
939  # e-mips* has more than one emulation per file, e-i386* has just one at the
940  # moment.  If only one emulation is specified, then don't define
941  # USE_EMULATIONS or include any of the e-files as they will only be bloat.
942  case "${obj_format}${emfiles}" in
943    multi* | *mips*)
944      extra_objects="$extra_objects $emfiles"
945      AC_DEFINE(USE_EMULATIONS, 1, [Use emulation support?]) ;;
946  esac
947fi
948AC_SUBST(extra_objects)
949AC_DEFINE_UNQUOTED(EMULATIONS, $EMULATIONS, [Supported emulations.])
950AC_DEFINE_UNQUOTED(DEFAULT_EMULATION, "$DEFAULT_EMULATION",
951		   [Default emulation.])
952
953case ${primary_bfd_gas}-${target_cpu_type}-${obj_format} in
954  yes-*-coff)	need_bfd=yes ;;
955  no-*-coff)	need_bfd=yes
956		AC_DEFINE(MANY_SEGMENTS, 1, [old COFF support?]) ;;
957esac
958
959reject_dev_configs=yes
960
961case ${reject_dev_configs}-${dev} in
962  yes-yes) # Oops.
963    AC_MSG_ERROR(GAS does not support the ${generic_target} configuration.)
964    ;;
965esac
966
967AC_SUBST(target_cpu_type)
968AC_SUBST(obj_format)
969AC_SUBST(te_file)
970AC_SUBST(install_tooldir)
971AC_SUBST(atof)
972dnl AC_SUBST(emulation)
973
974case "${primary_bfd_gas}" in
975  yes)	AC_DEFINE(BFD_ASSEMBLER, 1, [Use BFD interface?])
976	need_bfd=yes ;;
977esac
978
979# do we need the opcodes library?
980case "${need_opcodes}" in
981yes)
982  OPCODES_LIB=../opcodes/libopcodes.la
983  ;;
984esac
985
986case "${need_bfd}" in
987yes)
988  BFDLIB=../bfd/libbfd.la
989  BFDVER_H=../bfd/bfdver.h
990  ALL_OBJ_DEPS="$ALL_OBJ_DEPS"' ../bfd/bfd.h $(INCDIR)/symcat.h'
991  ;;
992esac
993
994AC_SUBST(BFDLIB)
995AC_SUBST(OPCODES_LIB)
996
997AC_SUBST(BFDVER_H)
998AC_SUBST(ALL_OBJ_DEPS)
999
1000AC_DEFINE_UNQUOTED(TARGET_ALIAS,	"${target_alias}", [Target alias.])
1001AC_DEFINE_UNQUOTED(TARGET_CANONICAL,	"${target}",       [Canonical target.])
1002AC_DEFINE_UNQUOTED(TARGET_CPU,		"${target_cpu}",   [Target CPU.])
1003AC_DEFINE_UNQUOTED(TARGET_VENDOR,	"${target_vendor}", [Target vendor.])
1004AC_DEFINE_UNQUOTED(TARGET_OS,		"${target_os}",    [Target OS.])
1005
1006AC_PROG_CC
1007
1008AC_PROG_YACC
1009AM_PROG_LEX
1010
1011ALL_LINGUAS="fr tr es"
1012CY_GNU_GETTEXT
1013
1014AM_MAINTAINER_MODE
1015AC_EXEEXT
1016
1017AC_CHECK_HEADERS(string.h stdlib.h memory.h strings.h unistd.h stdarg.h varargs.h errno.h sys/types.h)
1018
1019# Put this here so that autoconf's "cross-compiling" message doesn't confuse
1020# people who are not cross-compiling but are compiling cross-assemblers.
1021AC_MSG_CHECKING(whether compiling a cross-assembler)
1022if test "${host}" = "${target}"; then
1023  cross_gas=no
1024else
1025  cross_gas=yes
1026  AC_DEFINE(CROSS_COMPILE, 1, [Compiling cross-assembler?])
1027fi
1028AC_MSG_RESULT($cross_gas)
1029
1030dnl ansidecl.h will deal with const
1031dnl AC_CONST
1032AC_FUNC_ALLOCA
1033AC_C_INLINE
1034
1035# VMS doesn't have unlink.
1036AC_CHECK_FUNCS(unlink remove, break)
1037
1038# Some systems don't have sbrk().
1039AC_CHECK_FUNCS(sbrk)
1040
1041# do we need the math library?
1042case "${need_libm}" in
1043yes)
1044  AC_CHECK_LIBM
1045  AC_SUBST(LIBM)
1046  ;;
1047esac
1048
1049# Some non-ANSI preprocessors botch requoting inside strings.  That's bad
1050# enough, but on some of those systems, the assert macro relies on requoting
1051# working properly!
1052GAS_WORKING_ASSERT
1053
1054# On some systems, the system header files may not declare malloc, realloc,
1055# and free.  There are places where gas needs these functions to have been
1056# declared -- such as when taking their addresses.
1057gas_test_headers="
1058#ifdef HAVE_MEMORY_H
1059#include <memory.h>
1060#endif
1061#ifdef HAVE_STRING_H
1062#include <string.h>
1063#else
1064#ifdef HAVE_STRINGS_H
1065#include <strings.h>
1066#endif
1067#endif
1068#ifdef HAVE_STDLIB_H
1069#include <stdlib.h>
1070#endif
1071#ifdef HAVE_UNISTD_H
1072#include <unistd.h>
1073#endif
1074"
1075GAS_CHECK_DECL_NEEDED(strstr, f, char *(*f)(), $gas_test_headers)
1076GAS_CHECK_DECL_NEEDED(malloc, f, char *(*f)(), $gas_test_headers)
1077GAS_CHECK_DECL_NEEDED(free, f, void (*f)(), $gas_test_headers)
1078GAS_CHECK_DECL_NEEDED(sbrk, f, char *(*f)(), $gas_test_headers)
1079GAS_CHECK_DECL_NEEDED(environ, f, char **f, $gas_test_headers)
1080
1081# Does errno.h declare errno, or do we have to add a separate declaration
1082# for it?
1083GAS_CHECK_DECL_NEEDED(errno, f, int f, [
1084#ifdef HAVE_ERRNO_H
1085#include <errno.h>
1086#endif
1087])
1088
1089dnl This must come last.
1090
1091dnl We used to make symlinks to files in the source directory, but now
1092dnl we just use the right name for .c files, and create .h files in
1093dnl the build directory which include the right .h file.  Make sure
1094dnl the old symlinks don't exist, so that a reconfigure in an existing
1095dnl directory behaves reasonably.
1096
1097AC_CONFIG_FILES(Makefile doc/Makefile po/Makefile.in:po/Make-in)
1098AC_CONFIG_COMMANDS([default],
1099[rm -f targ-cpu.c targ-cpu.h obj-format.h obj-format.c targ-env.h atof-targ.c itbl-cpu.h
1100 echo '#include "tc-'"${target_cpu_type}"'.h"' > targ-cpu.h
1101 echo '#include "obj-'"${obj_format}"'.h"' > obj-format.h
1102 echo '#include "te-'"${te_file}"'.h"' > targ-env.h
1103 echo '#include "itbl-'"${target_cpu_type}"'.h"' > itbl-cpu.h
1104 if test "x$cgen_cpu_prefix" != x ; then
1105   echo '#include "opcodes/'"${cgen_cpu_prefix}"'-desc.h"' > cgen-desc.h
1106 fi
1107
1108 sed -e '/POTFILES =/r po/POTFILES' po/Makefile.in > po/Makefile],
1109[target_cpu_type=${target_cpu_type}
1110 cgen_cpu_prefix=${cgen_cpu_prefix}
1111 obj_format=${obj_format}
1112 te_file=${te_file}])
1113
1114AC_OUTPUT
1115