1 dnl Process this file with autoconf to produce a configure script.
3 dnl And be careful when changing it! If you must add tests with square
4 dnl brackets, be sure changequote invocations surround it.
7 dnl v2.5 needed for --bindir et al
13 AM_INIT_AUTOMAKE(gas, 2.9.4)
18 AC_ARG_ENABLE(bfd-assembler,
19 [ --enable-bfd-assembler use BFD back end for writing object files],
20 [case "${enableval}" in
21 yes) need_bfd=yes user_bfd_gas=yes ;;
22 no) user_bfd_gas=no ;;
23 *) AC_MSG_ERROR(bad value ${enableval} given for bfd-assembler option) ;;
25 AC_ARG_ENABLE(targets,
26 [ targets alternative target configurations besides the primary],
27 [case "${enableval}" in
28 yes | "") AC_ERROR(enable-targets option must specify target names or 'all')
30 no) enable_targets= ;;
31 *) enable_targets=$enableval ;;
33 AC_ARG_ENABLE(commonbfdlib,
34 [ --enable-commonbfdlib build shared BFD/opcodes/libiberty library],
35 [case "${enableval}" in
36 yes) commonbfdlib=true ;;
37 no) commonbfdlib=false ;;
38 *) AC_MSG_ERROR([bad value ${enableval} for BFD commonbfdlib option]) ;;
41 # Generate a header file
42 AM_CONFIG_HEADER(config.h:config.in)
46 # Makefile target for installing gas in $(tooldir)/bin.
47 install_tooldir=install-exec-tooldir
50 if test -n "$enable_targets" ; then
51 for t in `echo $enable_targets | sed 's/,/ /g'`; do
52 result=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $t 2>/dev/null`
53 if test -n "$result" ; then
54 canon_targets="$canon_targets $result"
56 # # Permit "all", etc. We don't support it yet though.
57 # canon_targets="$canon_targets $t"
60 GAS_UNIQ(canon_targets)
65 for this_target in $target $canon_targets ; do
68 eval `echo $this_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/cpu=\1 vendor=\2 os=\3/'`
71 # check for architecture variants
75 alpha*) cpu_type=alpha ;;
76 armeb) cpu_type=arm endian=big ;;
77 arm*) cpu_type=arm endian=little ;;
78 thumb*) cpu_type=arm endian=little ;;
79 hppa*) cpu_type=hppa ;;
81 i[456]86) cpu_type=i386 ;;
82 m680[012346]0) cpu_type=m68k ;;
84 m68008) cpu_type=m68k ;;
85 m683??) cpu_type=m68k ;;
86 m5200) cpu_type=m68k ;;
88 mips*el) cpu_type=mips endian=little ;;
89 # start-sanitize-r5900
90 mips*5900*) cpu_type=mips endian=little ;;
92 mips*) cpu_type=mips endian=big ;;
93 powerpcle*) cpu_type=ppc endian=little ;;
94 powerpc*) cpu_type=ppc endian=big ;;
95 rs6000*) cpu_type=ppc ;;
96 sparclite*) cpu_type=sparc arch=sparclite ;;
97 sparclet*) cpu_type=sparc arch=sparclet ;;
98 sparc64*) cpu_type=sparc arch=v9-64 ;;
99 sparc86x*) cpu_type=sparc arch=sparc86x ;;
100 sparc*) cpu_type=sparc arch=sparclite ;; # ??? See tc-sparc.c.
101 v850*) cpu_type=v850 ;;
102 *) cpu_type=${cpu} ;;
105 if test ${this_target} = $target ; then
106 target_cpu_type=${cpu_type}
107 elif test ${target_cpu_type} != ${cpu_type} ; then
111 generic_target=${cpu_type}-$vendor-$os
116 # assign object format
117 case ${generic_target} in
118 a29k-*-coff) fmt=coff ;;
119 a29k-amd-udi) fmt=coff ;;
120 a29k-amd-ebmon) fmt=coff ;;
121 a29k-nyu-sym1) fmt=coff ;;
122 a29k-*-vxworks*) fmt=coff ;;
124 alpha*-*-*vms*) fmt=evax ;;
125 alpha*-*-netware*) fmt=ecoff ;;
126 alpha*-*-openbsd*) fmt=ecoff ;;
127 alpha*-*-osf*) fmt=ecoff ;;
128 alpha*-*-linuxecoff*) fmt=ecoff ;;
129 alpha*-*-linux-gnu*) fmt=elf em=linux ;;
130 alpha*-*-netbsd*) fmt=elf em=nbsd ;;
132 arc-*-elf*) fmt=elf bfd_gas=yes ;;
134 arm-*-riscix*) fmt=aout em=riscix ;;
135 arm-*-aout) fmt=aout ;;
136 arm-*-coff | thumb-*-coff) fmt=coff ;;
137 arm-*-elf | thumb-*-elf) fmt=elf ;;
138 arm-*-riscix*) fmt=aout ;;
139 arm-*-pe | thumb-*-pe) fmt=coff em=pe ;;
141 d10v-*-*) fmt=elf bfd_gas=yes ;;
142 d30v-*-*) fmt=elf bfd_gas=yes ;;
145 dvp-*-*) fmt=elf bfd_gas=yes install_tooldir= ;;
148 # start-sanitize-fr30
149 fr30-*-*) fmt=elf bfd_gas=yes ;;
152 hppa-*-*elf*) fmt=elf em=hppa ;;
153 hppa-*-lites*) fmt=elf em=hppa ;;
154 hppa-*-osf*) fmt=som em=hppa ;;
155 hppa-*-rtems*) fmt=elf em=hppa ;;
156 hppa-*-hpux*) fmt=som em=hppa ;;
157 hppa-*-bsd*) fmt=som em=hppa ;;
158 hppa-*-hiux*) fmt=som em=hppa ;;
160 h8300-*-coff) fmt=coff ;;
162 i386-ibm-aix*) fmt=coff em=i386aix ;;
163 i386-sequent-bsd*) fmt=aout em=dynix bfd_gas=yes ;;
164 dnl start-sanitize-beos
165 i386-*-beospe*) fmt=coff em=pe bfd_gas=yes ;;
166 i386-*-beoself* | i386-*-beos*) fmt=elf bfd_gas=yes ;;
167 dnl end-sanitize-beos
168 i386-*-bsd*) fmt=aout em=386bsd ;;
169 i386-*-netbsd0.8) fmt=aout em=386bsd ;;
170 i386-*-netbsd*) fmt=aout em=nbsd bfd_gas=yes;;
171 i386-*-openbsd*) fmt=aout em=nbsd bfd_gas=yes;;
172 i386-*-linux*aout* | i386-*-linuxoldld) fmt=aout em=linux ;;
173 i386-*-linux*coff*) fmt=coff em=linux ;;
174 i386-*-linux-gnu*) fmt=elf em=linux bfd_gas=yes ;;
175 i386-*-lynxos*) fmt=coff em=lynx ;;
176 i386-*-sysv4* | i386-*-solaris* | i386-*-elf)
177 fmt=elf bfd_gas=yes ;;
178 i386-*-freebsdelf*) fmt=elf bfd_gas=yes ;;
179 i386-*-freebsd*) fmt=aout em=386bsd ;;
180 i386-*-coff | i386-*-sysv* | i386-*-sco3.2v5*coff | i386-*-isc*)
182 i386-*-sco3.2v5*) fmt=elf
183 if test ${this_target} = $target; then
187 i386-*-sco3.2*) fmt=coff ;;
188 i386-*-vsta) fmt=aout ;;
189 i386-*-msdosdjgpp* | i386-*-go32* | i386-go32-rtems*)
191 i386-*-rtems*) fmt=coff ;;
192 i386-*-gnu*) fmt=elf ;;
194 fmt=aout em=mach bfd_gas=yes ;;
195 i386-*-msdos*) fmt=aout ;;
196 i386-*-moss*) fmt=elf ;;
197 i386-*-pe) fmt=coff em=pe ;;
198 i386-*-cygwin*) fmt=coff em=pe bfd_gas=yes ;;
199 i386-*-mingw32*) fmt=coff em=pe bfd_gas=yes ;;
200 i386-*-*nt*) fmt=coff em=pe ;;
201 i960-*-bout) fmt=bout ;;
202 i960-*-coff) fmt=coff em=ic960 ;;
203 i960-*-rtems*) fmt=coff em=ic960 ;;
204 i960-*-nindy*) fmt=bout ;;
205 i960-*-vxworks4*) fmt=bout ;;
206 i960-*-vxworks5.0) fmt=bout ;;
207 i960-*-vxworks5.*) fmt=coff em=ic960 ;;
208 i960-*-vxworks*) fmt=bout ;;
210 m32r-*-*) fmt=elf bfd_gas=yes ;;
212 m68k-*-vxworks* | m68k-ericsson-ose | m68k-*-sunos*)
214 m68k-motorola-sysv*) fmt=coff em=delta ;;
215 m68k-bull-sysv3*) fmt=coff em=dpx2 ;;
216 m68k-apollo-*) fmt=coff em=apollo ;;
217 m68k-*-sysv4*) # must be before -sysv*
219 m68k-*-elf*) fmt=elf ;;
220 m68k-*-coff | m68k-*-sysv* | m68k-*-rtems*)
222 m68k-*-hpux*) fmt=hp300 em=hp300 ;;
223 m68k-*-linux*aout*) fmt=aout em=linux ;;
224 m68k-*-linux-gnu*) fmt=elf em=linux ;;
225 m68k-*-gnu*) fmt=elf ;;
226 m68k-*-lynxos*) fmt=coff em=lynx ;;
227 m68k-*-netbsd*) fmt=aout em=nbsd bfd_gas=yes ;;
228 m68k-*-openbsd*) fmt=aout em=nbsd bfd_gas=yes ;;
229 m68k-apple-aux*) fmt=coff em=aux ;;
230 m68k-*-psos*) fmt=elf em=psos;;
232 m88k-motorola-sysv3*) fmt=coff em=delt88 ;;
233 m88k-*-coff*) fmt=coff ;;
235 # don't change em like *-*-bsd does
236 mips-dec-netbsd*) fmt=elf endian=little ;;
237 mips-dec-openbsd*) fmt=elf endian=little ;;
238 mips-dec-bsd*) fmt=aout endian=little ;;
239 mips-sony-bsd*) fmt=ecoff ;;
240 mips-*-bsd*) AC_MSG_ERROR(Unknown vendor for mips-bsd configuration.) ;;
241 mips-*-ultrix*) fmt=ecoff endian=little ;;
242 mips-*-osf*) fmt=ecoff endian=little ;;
243 mips-*-ecoff*) fmt=ecoff ;;
244 mips-*-ecoff*) fmt=ecoff ;;
245 mips-*-irix6*) fmt=elf ;;
246 mips-*-irix5*) fmt=elf ;;
247 mips-*-irix*) fmt=ecoff ;;
248 mips-*-lnews*) fmt=ecoff em=lnews ;;
249 mips-*-riscos*) fmt=ecoff ;;
250 mips-*-sysv*) fmt=ecoff ;;
251 mips-*-elf* | mips-*-rtems* | mips-*-linux-gnu* | mips-*-gnu* | mips-*-openbsd*)
253 mn10200-*-*) fmt=elf bfd_gas=yes ;;
254 mn10300-*-*) fmt=elf bfd_gas=yes ;;
255 ppc-*-pe | ppc-*-cygwin* | ppc-*-winnt*)
257 ppc-*-aix*) fmt=coff ;;
258 ppc-*-beos*) fmt=coff ;;
259 ppc-*-*bsd* | ppc-*-elf* | ppc-*-eabi* | ppc-*-sysv4*)
261 ppc-*-linux-gnu*) fmt=elf
264 *) AC_MSG_ERROR(GNU/Linux must be configured big endian) ;;
267 ppc-*-solaris*) fmt=elf
268 if test ${this_target} = $target; then
269 AC_DEFINE(TARGET_SOLARIS_COMMENT)
271 if test x${endian} = xbig; then
272 AC_MSG_ERROR(Solaris must be configured little endian)
275 ppc-*-rtems*) fmt=elf ;;
276 ppc-*-macos* | ppc-*-mpw*)
278 ppc-*-netware*) fmt=elf em=ppcnw ;;
280 sh-*-elf*) fmt=elf ;;
281 sh-*-coff*) fmt=coff ;;
282 sh-*-rtems*) fmt=coff ;;
284 ns32k-pc532-mach* | ns32k-pc532-ux*) fmt=aout em=pc532mach ;;
285 ns32k-pc532-netbsd* | ns32k-pc532-lites*) fmt=aout em=nbsd532 ;;
286 ns32k-pc532-openbsd*) fmt=aout em=nbsd532 ;;
288 sparc-*-rtems*) fmt=aout ;;
289 sparc-*-sunos4*) fmt=aout em=sun3 ;;
290 sparc-*-aout | sparc*-*-vxworks*)
291 fmt=aout em=sparcaout ;;
292 sparc-*-coff) fmt=coff ;;
293 sparc-*-linux*aout*) fmt=aout em=linux ;;
294 sparc-*-linux-gnu*) fmt=elf em=linux ;;
295 sparc-*-lynxos*) fmt=coff em=lynx ;;
296 sparc-fujitsu-none) fmt=aout ;;
297 sparc-*-elf | sparc-*-sysv4* | sparc-*-solaris*)
299 sparc-*-netbsd*) fmt=aout em=nbsd ;;
300 sparc-*-openbsd*) fmt=aout em=nbsd ;;
302 tic30-*-*aout*) fmt=aout bfd_gas=yes ;;
303 tic30-*-*coff*) fmt=coff bfd_gas=yes ;;
304 # start-sanitize-tic80
305 tic80-*-*) fmt=coff ;;
308 v850-*-*) fmt=elf bfd_gas=yes ;;
310 # start-sanitize-v850e
311 v850e-*-*) fmt=elf bfd_gas=yes ;;
312 v850ea-*-*) fmt=elf bfd_gas=yes ;;
314 vax-*-bsd* | vax-*-ultrix*)
316 vax-*-vms) fmt=vms ;;
318 z8k-*-coff | z8k-*-sim)
323 *-*-aout | *-*-scout)
329 *-*-generic) fmt=generic ;;
330 *-*-xray | *-*-hms) fmt=coff ;;
332 *-*-elf | *-*-sysv4* | *-*-solaris*)
333 AC_MSG_WARN(GAS support for ${generic_target} is incomplete.)
335 *-*-vxworks) fmt=aout ;;
336 *-*-netware) fmt=elf ;;
339 if test ${this_target} = $target ; then
340 if test x${endian} = xbig; then
341 AC_DEFINE(TARGET_BYTES_BIG_ENDIAN, 1)
342 elif test x${endian} = xlittle; then
343 AC_DEFINE(TARGET_BYTES_BIG_ENDIAN, 0)
347 case ${cpu_type}-${fmt} in
348 alpha*-*) bfd_gas=yes ;;
349 arm-*) bfd_gas=yes ;;
351 # i386-aout) bfd_gas=preferred ;;
352 mips-*) bfd_gas=yes ;;
353 ns32k-*) bfd_gas=yes ;;
354 ppc-*) bfd_gas=yes ;;
355 sparc-*) bfd_gas=yes ;;
356 *-elf) bfd_gas=yes ;;
357 *-ecoff) bfd_gas=yes ;;
358 *-som) bfd_gas=yes ;;
362 # Other random stuff.
364 # do we need the opcodes library?
371 case "${enable_shared}" in
372 yes) shared_opcodes=true ;;
373 *opcodes*) shared_opcodes=true ;;
374 *) shared_opcodes=false ;;
376 if test "${shared_opcodes}" = "true"; then
377 # A shared libopcodes must be linked against libbfd.
385 case "x${extra_objects}" in
387 *) extra_objects="$extra_objects cgen.o"
388 AC_DEFINE(USING_CGEN)
393 # start-sanitize-fr30
395 case "x${extra_objects}" in
397 *) extra_objects="$extra_objects cgen.o"
398 AC_DEFINE(USING_CGEN)
405 case ${extra_objects} in
407 *) extra_objects="$extra_objects m68k-parse.o" ;;
412 echo ${extra_objects} | grep -s "itbl-parse.o"
413 if test $? -ne 0 ; then
414 extra_objects="$extra_objects itbl-parse.o"
417 echo ${extra_objects} | grep -s "itbl-lex.o"
418 if test $? -ne 0 ; then
419 extra_objects="$extra_objects itbl-lex.o"
422 echo ${extra_objects} | grep -s "itbl-ops.o"
423 if test $? -ne 0 ; then
424 extra_objects="$extra_objects itbl-ops.o"
429 if test $this_target = $target ; then
430 AC_DEFINE_UNQUOTED(DEFAULT_ARCH, "${arch}")
438 # See if we really can support this configuration with the emulation code.
440 if test $this_target = $target ; then
441 primary_bfd_gas=$bfd_gas
445 if test $bfd_gas = no ; then
446 # Can't support other configurations this way.
449 elif test $bfd_gas = no ; then
450 # Can't support this configuration.
454 # From target name and format, produce a list of supported emulations.
456 case ${generic_target}-${fmt} in
457 mips-*-irix5*-*) emulation="mipsbelf mipslelf mipself mipsbecoff mipslecoff mipsecoff" ;;
458 mips-*-linux-gnu*-*) case "$endian" in
459 big) emulation="mipsbelf mipslelf mipself mipsbecoff mipslecoff mipsecoff" ;;
460 *) emulation="mipslelf mipsbelf mipself mipslecoff mipsbecoff mipsecoff" ;;
462 mips-*-lnews*-ecoff) ;;
463 mips-*-*-ecoff) case "$endian" in
464 big) emulation="mipsbecoff mipslecoff mipsecoff" ;;
465 *) emulation="mipslecoff mipsbecoff mipsecoff" ;;
467 mips-*-*-elf) case "$endian" in
468 big) emulation="mipsbelf mipslelf mipself" ;;
469 *) emulation="mipslelf mipsbelf mipself" ;;
470 # Uncommenting the next line will turn on support for i386 COFF
471 # in any i386 ELF configuration. This probably doesn't work
473 # i386-*-*-elf) emulation="i386coff i386elf" ;;
477 emulations="$emulations $emulation"
481 # Assign floating point type. Most processors with FP support
482 # IEEE FP. On those that don't support FP at all, usually IEEE
484 case ${target_cpu} in
485 vax | tahoe ) atof=${target_cpu} ;;
489 case "${obj_format}" in
490 "") AC_MSG_ERROR(GAS does not know what format to use for target ${target}) ;;
493 # Unfortunately the cpu in cpu-opc.h file isn't always $(TARGET_CPU).
495 case "x${extra_objects}" in
497 case ${target_cpu} in
498 *) cgen_cpu_prefix=${target_cpu} ;;
502 AC_SUBST(cgen_cpu_prefix)
505 dnl Make sure the desired support files exist.
508 if test ! -r ${srcdir}/config/tc-${target_cpu_type}.c; then
509 AC_MSG_ERROR(GAS does not support target CPU ${target_cpu_type})
512 if test ! -r ${srcdir}/config/obj-${obj_format}.c; then
513 AC_MSG_ERROR(GAS does not have support for object file format ${obj_format})
516 case ${user_bfd_gas}-${primary_bfd_gas} in
518 # We didn't override user's choice.
521 AC_MSG_WARN(Use of BFD is required for ${target}; overriding config options.)
533 # User specified nothing.
537 # Some COFF configurations want these random other flags set.
538 case ${obj_format} in
540 case ${target_cpu_type} in
541 i386) AC_DEFINE(I386COFF) ;;
542 m68k) AC_DEFINE(M68KCOFF) ;;
543 m88k) AC_DEFINE(M88KCOFF) ;;
548 # Getting this done right is going to be a bitch. Each configuration specified
549 # with --enable-targets=... should be checked for environment, format, cpu, and
552 # For each configuration, the necessary object file support code must be linked
553 # in. This might be only one, it might be up to four. The necessary emulation
554 # code needs to be provided, too.
556 # And then there's "--enable-targets=all"....
558 # For now, just always do it for MIPS ELF or ECOFF configurations. Sigh.
560 formats="${obj_format}"
564 for em in . $emulations ; do
568 fmt=elf file=mipself ;;
569 mipsbecoff | mipslecoff)
570 fmt=ecoff file=mipsecoff ;;
572 fmt=coff file=i386coff ;;
574 fmt=elf file=i386elf ;;
576 formats="$formats $fmt"
577 emfiles="$emfiles e-$file.o"
578 EMULATIONS="$EMULATIONS &$em,"
582 if test `set . $formats ; shift ; echo $#` -gt 1 ; then
583 for fmt in $formats ; do
585 aout) AC_DEFINE(OBJ_MAYBE_AOUT) ;;
586 bout) AC_DEFINE(OBJ_MAYBE_BOUT) ;;
587 coff) AC_DEFINE(OBJ_MAYBE_COFF) ;;
588 ecoff) AC_DEFINE(OBJ_MAYBE_ECOFF) ;;
589 elf) AC_DEFINE(OBJ_MAYBE_ELF) ;;
590 generic) AC_DEFINE(OBJ_MAYBE_GENERIC) ;;
591 hp300) AC_DEFINE(OBJ_MAYBE_HP300) ;;
592 ieee) AC_DEFINE(OBJ_MAYBE_IEEE) ;;
593 som) AC_DEFINE(OBJ_MAYBE_SOM) ;;
594 vms) AC_DEFINE(OBJ_MAYBE_VMS) ;;
596 extra_objects="$extra_objects obj-$fmt.o"
600 if test `set . $emfiles ; shift ; echo $#` -gt 0 ; then
602 extra_objects="$extra_objects $emfiles"
603 DEFAULT_EMULATION=`set . $emulations ; echo $2`
604 AC_DEFINE(USE_EMULATIONS)
606 AC_SUBST(extra_objects)
607 AC_DEFINE_UNQUOTED(EMULATIONS, $EMULATIONS)
608 AC_DEFINE_UNQUOTED(DEFAULT_EMULATION, "$DEFAULT_EMULATION")
610 case ${primary_bfd_gas}-${target_cpu_type}-${obj_format} in
611 yes-*-coff) need_bfd=yes ;;
612 no-*-coff) need_bfd=yes
613 AC_DEFINE(MANY_SEGMENTS) ;;
616 reject_dev_configs=yes
618 case ${reject_dev_configs}-${dev} in
620 AC_MSG_ERROR(GAS does not support the ${generic_target} configuration.)
624 AC_SUBST(target_cpu_type)
627 AC_SUBST(install_tooldir)
629 dnl AC_SUBST(emulation)
631 case "${primary_bfd_gas}" in
632 yes) AC_DEFINE(BFD_ASSEMBLER)
636 # do we need the opcodes library?
637 case "${need_opcodes}" in
639 OPCODES_LIB=../opcodes/libopcodes.la
643 case "${need_bfd}" in
645 BFDLIB=../bfd/libbfd.la
646 ALL_OBJ_DEPS="$ALL_OBJ_DEPS ../bfd/bfd.h"
651 AC_SUBST(OPCODES_LIB)
653 AC_SUBST(ALL_OBJ_DEPS)
655 AC_DEFINE_UNQUOTED(TARGET_ALIAS, "${target_alias}")
656 AC_DEFINE_UNQUOTED(TARGET_CANONICAL, "${target}")
657 AC_DEFINE_UNQUOTED(TARGET_CPU, "${target_cpu}")
658 AC_DEFINE_UNQUOTED(TARGET_VENDOR, "${target_vendor}")
659 AC_DEFINE_UNQUOTED(TARGET_OS, "${target_os}")
673 AC_CHECK_HEADERS(string.h stdlib.h memory.h strings.h unistd.h stdarg.h varargs.h errno.h sys/types.h)
675 # Put this here so that autoconf's "cross-compiling" message doesn't confuse
676 # people who are not cross-compiling but are compiling cross-assemblers.
677 AC_MSG_CHECKING(whether compiling a cross-assembler)
678 if test "${host}" = "${target}"; then
682 AC_DEFINE(CROSS_COMPILE)
684 AC_MSG_RESULT($cross_gas)
686 dnl ansidecl.h will deal with const
691 # VMS doesn't have unlink.
692 AC_CHECK_FUNCS(unlink remove, break)
694 # Some systems don't have sbrk().
697 # Some non-ANSI preprocessors botch requoting inside strings. That's bad
698 # enough, but on some of those systems, the assert macro relies on requoting
702 # On some systems, the system header files may not declare malloc, realloc,
703 # and free. There are places where gas needs these functions to have been
704 # declared -- such as when taking their addresses.
712 #ifdef HAVE_STRINGS_H
723 GAS_CHECK_DECL_NEEDED(strstr, f, char *(*f)(), $gas_test_headers)
724 GAS_CHECK_DECL_NEEDED(malloc, f, char *(*f)(), $gas_test_headers)
725 GAS_CHECK_DECL_NEEDED(free, f, void (*f)(), $gas_test_headers)
726 GAS_CHECK_DECL_NEEDED(sbrk, f, char *(*f)(), $gas_test_headers)
728 # Does errno.h declare errno, or do we have to add a separate declaration
730 GAS_CHECK_DECL_NEEDED(errno, f, int f, [
736 dnl This must come last.
738 dnl We used to make symlinks to files in the source directory, but now
739 dnl we just use the right name for .c files, and create .h files in
740 dnl the build directory which include the right .h file. Make sure
741 dnl the old symlinks don't exist, so that a reconfigure in an existing
742 dnl directory behaves reasonably.
744 AC_OUTPUT(Makefile doc/Makefile .gdbinit:gdbinit.in po/Makefile.in:po/Make-in,
745 [rm -f targ-cpu.c targ-cpu.h obj-format.h obj-format.c targ-env.h atof-targ.c itbl-cpu.h
746 echo '#include "tc-'"${target_cpu_type}"'.h"' > targ-cpu.h
747 echo '#include "obj-'"${obj_format}"'.h"' > obj-format.h
748 echo '#include "te-'"${te_file}"'.h"' > targ-env.h
749 echo '#include "itbl-'"${target_cpu_type}"'.h"' > itbl-cpu.h
750 case ${target_cpu_type} in
751 m32r) echo '#include "opcodes/'"${target_cpu_type}"'-opc.h"' > cgen-opc.h ;;
752 # start-sanitize-fr30
753 fr30) echo '#include "opcodes/'"${target_cpu_type}"'-opc.h"' > cgen-opc.h ;;
757 sed -e '/POTFILES =/r po/POTFILES' po/Makefile.in > po/Makefile],
758 [target_cpu_type=${target_cpu_type}
759 obj_format=${obj_format}