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 if test x${endian} = xbig; then
108 AC_DEFINE(TARGET_BYTES_BIG_ENDIAN, 1)
109 elif test x${endian} = xlittle; then
110 AC_DEFINE(TARGET_BYTES_BIG_ENDIAN, 0)
112 elif test ${target_cpu_type} != ${cpu_type} ; then
116 generic_target=${cpu_type}-$vendor-$os
121 # assign object format
122 case ${generic_target} in
123 a29k-*-coff) fmt=coff ;;
124 a29k-amd-udi) fmt=coff ;;
125 a29k-amd-ebmon) fmt=coff ;;
126 a29k-nyu-sym1) fmt=coff ;;
127 a29k-*-vxworks*) fmt=coff ;;
129 alpha*-*-*vms*) fmt=evax ;;
130 alpha*-*-netware*) fmt=ecoff ;;
131 alpha*-*-openbsd*) fmt=ecoff ;;
132 alpha*-*-osf*) fmt=ecoff ;;
133 alpha*-*-linuxecoff*) fmt=ecoff ;;
134 alpha*-*-linux-gnu*) fmt=elf em=linux ;;
135 alpha*-*-netbsd*) fmt=elf em=nbsd ;;
137 arc-*-elf*) fmt=elf bfd_gas=yes ;;
139 arm-*-riscix*) fmt=aout em=riscix ;;
140 arm-*-aout) fmt=aout ;;
141 arm-*-coff | thumb-*-coff) fmt=coff ;;
142 arm-*-elf | thumb-*-elf) fmt=elf ;;
143 arm-*-riscix*) fmt=aout ;;
144 arm-*-pe | thumb-*-pe) fmt=coff em=pe ;;
146 d10v-*-*) fmt=elf bfd_gas=yes ;;
147 d30v-*-*) fmt=elf bfd_gas=yes ;;
150 dvp-*-*) fmt=elf bfd_gas=yes install_tooldir= ;;
153 fr30-*-*) fmt=elf bfd_gas=yes ;;
155 hppa-*-*elf*) fmt=elf em=hppa ;;
156 hppa-*-lites*) fmt=elf em=hppa ;;
157 hppa-*-osf*) fmt=som em=hppa ;;
158 hppa-*-rtems*) fmt=elf em=hppa ;;
159 hppa-*-hpux*) fmt=som em=hppa ;;
160 hppa-*-bsd*) fmt=som em=hppa ;;
161 hppa-*-hiux*) fmt=som em=hppa ;;
163 h8300-*-coff) fmt=coff ;;
165 i386-ibm-aix*) fmt=coff em=i386aix ;;
166 i386-sequent-bsd*) fmt=aout em=dynix bfd_gas=yes ;;
167 dnl start-sanitize-beos
168 i386-*-beospe*) fmt=coff em=pe bfd_gas=yes ;;
169 i386-*-beoself* | i386-*-beos*) fmt=elf bfd_gas=yes ;;
170 dnl end-sanitize-beos
171 i386-*-bsd*) fmt=aout em=386bsd ;;
172 i386-*-netbsd0.8) fmt=aout em=386bsd ;;
173 i386-*-netbsd*) fmt=aout em=nbsd bfd_gas=yes;;
174 i386-*-openbsd*) fmt=aout em=nbsd bfd_gas=yes;;
175 i386-*-linux*aout* | i386-*-linuxoldld) fmt=aout em=linux ;;
176 i386-*-linux*coff*) fmt=coff em=linux ;;
177 i386-*-linux-gnu*) fmt=elf em=linux bfd_gas=yes ;;
178 i386-*-lynxos*) fmt=coff em=lynx ;;
179 i386-*-sysv4* | i386-*-solaris* | i386-*-elf)
180 fmt=elf bfd_gas=yes ;;
181 i386-*-freebsdelf*) fmt=elf bfd_gas=yes ;;
182 i386-*-freebsd*) fmt=aout em=386bsd ;;
183 i386-*-coff | i386-*-sysv* | i386-*-sco3.2v5*coff | i386-*-isc*)
185 i386-*-sco3.2v5*) fmt=elf
186 if test ${this_target} = $target; then
190 i386-*-sco3.2*) fmt=coff ;;
191 i386-*-vsta) fmt=aout ;;
192 i386-*-msdosdjgpp* | i386-*-go32* | i386-go32-rtems*)
194 i386-*-rtems*) fmt=coff ;;
195 i386-*-gnu*) fmt=elf ;;
197 fmt=aout em=mach bfd_gas=yes ;;
198 i386-*-msdos*) fmt=aout ;;
199 i386-*-moss*) fmt=elf ;;
200 i386-*-pe) fmt=coff em=pe ;;
201 i386-*-cygwin*) fmt=coff em=pe bfd_gas=yes ;;
202 i386-*-mingw32*) fmt=coff em=pe bfd_gas=yes ;;
203 i386-*-*nt*) fmt=coff em=pe ;;
204 i960-*-bout) fmt=bout ;;
205 i960-*-coff) fmt=coff em=ic960 ;;
206 i960-*-rtems*) fmt=coff em=ic960 ;;
207 i960-*-nindy*) fmt=bout ;;
208 i960-*-vxworks4*) fmt=bout ;;
209 i960-*-vxworks5.0) fmt=bout ;;
210 i960-*-vxworks5.*) fmt=coff em=ic960 ;;
211 i960-*-vxworks*) fmt=bout ;;
213 m32r-*-*) fmt=elf bfd_gas=yes ;;
215 m68k-*-vxworks* | m68k-ericsson-ose | m68k-*-sunos*)
217 m68k-motorola-sysv*) fmt=coff em=delta ;;
218 m68k-bull-sysv3*) fmt=coff em=dpx2 ;;
219 m68k-apollo-*) fmt=coff em=apollo ;;
220 m68k-*-sysv4*) # must be before -sysv*
222 m68k-*-elf*) fmt=elf ;;
223 m68k-*-coff | m68k-*-sysv* | m68k-*-rtems*)
225 m68k-*-hpux*) fmt=hp300 em=hp300 ;;
226 m68k-*-linux*aout*) fmt=aout em=linux ;;
227 m68k-*-linux-gnu*) fmt=elf em=linux ;;
228 m68k-*-lynxos*) fmt=coff em=lynx ;;
229 m68k-*-netbsd*) fmt=aout em=nbsd bfd_gas=yes ;;
230 m68k-*-openbsd*) fmt=aout em=nbsd bfd_gas=yes ;;
231 m68k-apple-aux*) fmt=coff em=aux ;;
232 m68k-*-psos*) fmt=elf em=psos;;
234 m88k-motorola-sysv3*) fmt=coff em=delt88 ;;
235 m88k-*-coff*) fmt=coff ;;
237 # don't change em like *-*-bsd does
238 mips-dec-netbsd*) fmt=elf endian=little ;;
239 mips-dec-openbsd*) fmt=elf endian=little ;;
240 mips-dec-bsd*) fmt=aout ;;
241 mips-sony-bsd*) fmt=ecoff ;;
242 mips-*-bsd*) AC_MSG_ERROR(Unknown vendor for mips-bsd configuration.) ;;
243 mips-*-ultrix*) fmt=ecoff endian=little ;;
244 mips-*-osf*) fmt=ecoff endian=little ;;
245 mips-*-ecoff*) fmt=ecoff ;;
246 mips-*-ecoff*) fmt=ecoff ;;
247 mips-*-irix6*) fmt=elf ;;
248 mips-*-irix5*) fmt=elf ;;
249 mips-*-irix*) fmt=ecoff ;;
250 mips-*-lnews*) fmt=ecoff em=lnews ;;
251 mips-*-riscos*) fmt=ecoff ;;
252 mips-*-sysv*) fmt=ecoff ;;
253 mips-*-elf* | mips-*-rtems* | mips-*-linux-gnu* | mips-*-gnu* | mips-*-openbsd*)
255 mn10200-*-*) fmt=elf bfd_gas=yes ;;
256 mn10300-*-*) fmt=elf bfd_gas=yes ;;
257 ppc-*-pe | ppc-*-cygwin* | ppc-*-winnt*)
259 ppc-*-aix*) fmt=coff ;;
260 ppc-*-beos*) fmt=coff ;;
261 ppc-*-*bsd* | ppc-*-elf* | ppc-*-eabi* | ppc-*-sysv4*)
263 ppc-*-linux-gnu*) fmt=elf
266 *) AC_MSG_ERROR(GNU/Linux must be configured big endian) ;;
269 ppc-*-solaris*) fmt=elf
270 if test ${this_target} = $target; then
271 AC_DEFINE(TARGET_SOLARIS_COMMENT)
273 if test x${endian} = xbig; then
274 AC_MSG_ERROR(Solaris must be configured little endian)
277 ppc-*-rtems*) fmt=elf ;;
278 ppc-*-macos* | ppc-*-mpw*)
280 ppc-*-netware*) fmt=elf em=ppcnw ;;
282 sh-*-elf*) fmt=elf ;;
283 sh-*-coff*) fmt=coff ;;
284 sh-*-rtems*) fmt=coff ;;
286 ns32k-pc532-mach* | ns32k-pc532-ux*) fmt=aout em=pc532mach ;;
287 ns32k-pc532-netbsd* | ns32k-pc532-lites*) fmt=aout em=nbsd532 ;;
288 ns32k-pc532-openbsd*) fmt=aout em=nbsd532 ;;
290 sparc-*-rtems*) fmt=aout ;;
291 sparc-*-sunos4*) fmt=aout em=sun3 ;;
292 sparc-*-aout | sparc*-*-vxworks*)
293 fmt=aout em=sparcaout ;;
294 sparc-*-coff) fmt=coff ;;
295 sparc-*-linux*aout*) fmt=aout em=linux ;;
296 sparc-*-linux-gnu*) fmt=elf em=linux ;;
297 sparc-*-lynxos*) fmt=coff em=lynx ;;
298 sparc-fujitsu-none) fmt=aout ;;
299 sparc-*-elf | sparc-*-sysv4* | sparc-*-solaris*)
301 sparc-*-netbsd*) fmt=aout em=nbsd ;;
302 sparc-*-openbsd*) fmt=aout em=nbsd ;;
304 tic30-*-*aout*) fmt=aout bfd_gas=yes ;;
305 tic30-*-*coff*) fmt=coff bfd_gas=yes ;;
306 # start-sanitize-tic80
307 tic80-*-*) fmt=coff ;;
310 v850-*-*) fmt=elf bfd_gas=yes ;;
312 # start-sanitize-v850e
313 v850e-*-*) fmt=elf bfd_gas=yes ;;
314 v850ea-*-*) fmt=elf bfd_gas=yes ;;
316 vax-*-bsd* | vax-*-ultrix*)
318 vax-*-vms) fmt=vms ;;
320 z8k-*-coff | z8k-*-sim)
325 *-*-aout | *-*-scout)
331 *-*-generic) fmt=generic ;;
332 *-*-xray | *-*-hms) fmt=coff ;;
334 *-*-elf | *-*-sysv4* | *-*-solaris*)
335 AC_MSG_WARN(GAS support for ${generic_target} is incomplete.)
337 *-*-vxworks) fmt=aout ;;
338 *-*-netware) fmt=elf ;;
341 case ${cpu_type}-${fmt} in
342 alpha*-*) bfd_gas=yes ;;
343 arm-*) bfd_gas=yes ;;
345 # i386-aout) bfd_gas=preferred ;;
346 mips-*) bfd_gas=yes ;;
347 ns32k-*) bfd_gas=yes ;;
348 ppc-*) bfd_gas=yes ;;
349 sparc-*) bfd_gas=yes ;;
350 *-elf) bfd_gas=yes ;;
351 *-ecoff) bfd_gas=yes ;;
352 *-som) bfd_gas=yes ;;
356 # Other random stuff.
358 # do we need the opcodes library?
365 case "${enable_shared}" in
366 yes) shared_opcodes=true ;;
367 *opcodes*) shared_opcodes=true ;;
368 *) shared_opcodes=false ;;
370 if test "${shared_opcodes}" = "true"; then
371 # A shared libopcodes must be linked against libbfd.
379 case "x${extra_objects}" in
381 *) extra_objects="$extra_objects cgen.o"
382 AC_DEFINE(USING_CGEN)
388 case ${extra_objects} in
390 *) extra_objects="$extra_objects m68k-parse.o" ;;
395 echo ${extra_objects} | grep -s "itbl-parse.o"
396 if test $? -ne 0 ; then
397 extra_objects="$extra_objects itbl-parse.o"
400 echo ${extra_objects} | grep -s "itbl-lex.o"
401 if test $? -ne 0 ; then
402 extra_objects="$extra_objects itbl-lex.o"
405 echo ${extra_objects} | grep -s "itbl-ops.o"
406 if test $? -ne 0 ; then
407 extra_objects="$extra_objects itbl-ops.o"
412 if test $this_target = $target ; then
413 AC_DEFINE_UNQUOTED(DEFAULT_ARCH, "${arch}")
421 # See if we really can support this configuration with the emulation code.
423 if test $this_target = $target ; then
424 primary_bfd_gas=$bfd_gas
428 if test $bfd_gas = no ; then
429 # Can't support other configurations this way.
432 elif test $bfd_gas = no ; then
433 # Can't support this configuration.
437 # From target name and format, produce a list of supported emulations.
439 case ${generic_target}-${fmt} in
440 mips-*-irix5*-*) emulation="mipsbelf mipslelf mipself mipsbecoff mipslecoff mipsecoff" ;;
441 mips-*-linux-gnu*-*) case "$endian" in
442 big) emulation="mipsbelf mipslelf mipself mipsbecoff mipslecoff mipsecoff" ;;
443 *) emulation="mipslelf mipsbelf mipself mipslecoff mipsbecoff mipsecoff" ;;
445 mips-*-lnews*-ecoff) ;;
446 mips-*-*-ecoff) case "$endian" in
447 big) emulation="mipsbecoff mipslecoff mipsecoff" ;;
448 *) emulation="mipslecoff mipsbecoff mipsecoff" ;;
450 mips-*-*-elf) case "$endian" in
451 big) emulation="mipsbelf mipslelf mipself" ;;
452 *) emulation="mipslelf mipsbelf mipself" ;;
453 # Uncommenting the next line will turn on support for i386 COFF
454 # in any i386 ELF configuration. This probably doesn't work
456 # i386-*-*-elf) emulation="i386coff i386elf" ;;
460 emulations="$emulations $emulation"
464 # Assign floating point type. Most processors with FP support
465 # IEEE FP. On those that don't support FP at all, usually IEEE
467 case ${target_cpu} in
468 vax | tahoe ) atof=${target_cpu} ;;
472 case "${obj_format}" in
473 "") AC_MSG_ERROR(GAS does not know what format to use for target ${target}) ;;
476 # Unfortunately the cpu in cpu-opc.h file isn't always $(TARGET_CPU).
478 case "x${extra_objects}" in
480 case ${target_cpu} in
481 *) cgen_cpu_prefix=${target_cpu} ;;
485 AC_SUBST(cgen_cpu_prefix)
488 dnl Make sure the desired support files exist.
491 if test ! -r ${srcdir}/config/tc-${target_cpu_type}.c; then
492 AC_MSG_ERROR(GAS does not support target CPU ${target_cpu_type})
495 if test ! -r ${srcdir}/config/obj-${obj_format}.c; then
496 AC_MSG_ERROR(GAS does not have support for object file format ${obj_format})
499 case ${user_bfd_gas}-${primary_bfd_gas} in
501 # We didn't override user's choice.
504 AC_MSG_WARN(Use of BFD is required for ${target}; overriding config options.)
516 # User specified nothing.
520 # Some COFF configurations want these random other flags set.
521 case ${obj_format} in
523 case ${target_cpu_type} in
524 i386) AC_DEFINE(I386COFF) ;;
525 m68k) AC_DEFINE(M68KCOFF) ;;
526 m88k) AC_DEFINE(M88KCOFF) ;;
531 # Getting this done right is going to be a bitch. Each configuration specified
532 # with --enable-targets=... should be checked for environment, format, cpu, and
535 # For each configuration, the necessary object file support code must be linked
536 # in. This might be only one, it might be up to four. The necessary emulation
537 # code needs to be provided, too.
539 # And then there's "--enable-targets=all"....
541 # For now, just always do it for MIPS ELF or ECOFF configurations. Sigh.
543 formats="${obj_format}"
547 for em in . $emulations ; do
551 fmt=elf file=mipself ;;
552 mipsbecoff | mipslecoff)
553 fmt=ecoff file=mipsecoff ;;
555 fmt=coff file=i386coff ;;
557 fmt=elf file=i386elf ;;
559 formats="$formats $fmt"
560 emfiles="$emfiles e-$file.o"
561 EMULATIONS="$EMULATIONS &$em,"
565 if test `set . $formats ; shift ; echo $#` -gt 1 ; then
566 for fmt in $formats ; do
568 aout) AC_DEFINE(OBJ_MAYBE_AOUT) ;;
569 bout) AC_DEFINE(OBJ_MAYBE_BOUT) ;;
570 coff) AC_DEFINE(OBJ_MAYBE_COFF) ;;
571 ecoff) AC_DEFINE(OBJ_MAYBE_ECOFF) ;;
572 elf) AC_DEFINE(OBJ_MAYBE_ELF) ;;
573 generic) AC_DEFINE(OBJ_MAYBE_GENERIC) ;;
574 hp300) AC_DEFINE(OBJ_MAYBE_HP300) ;;
575 ieee) AC_DEFINE(OBJ_MAYBE_IEEE) ;;
576 som) AC_DEFINE(OBJ_MAYBE_SOM) ;;
577 vms) AC_DEFINE(OBJ_MAYBE_VMS) ;;
579 extra_objects="$extra_objects obj-$fmt.o"
583 if test `set . $emfiles ; shift ; echo $#` -gt 0 ; then
585 extra_objects="$extra_objects $emfiles"
586 DEFAULT_EMULATION=`set . $emulations ; echo $2`
587 AC_DEFINE(USE_EMULATIONS)
589 AC_SUBST(extra_objects)
590 AC_DEFINE_UNQUOTED(EMULATIONS, $EMULATIONS)
591 AC_DEFINE_UNQUOTED(DEFAULT_EMULATION, "$DEFAULT_EMULATION")
593 case ${primary_bfd_gas}-${target_cpu_type}-${obj_format} in
594 yes-*-coff) need_bfd=yes ;;
595 no-*-coff) need_bfd=yes
596 AC_DEFINE(MANY_SEGMENTS) ;;
599 reject_dev_configs=yes
601 case ${reject_dev_configs}-${dev} in
603 AC_MSG_ERROR(GAS does not support the ${generic_target} configuration.)
607 AC_SUBST(target_cpu_type)
610 AC_SUBST(install_tooldir)
612 dnl AC_SUBST(emulation)
614 case "${primary_bfd_gas}" in
615 yes) AC_DEFINE(BFD_ASSEMBLER)
619 # do we need the opcodes library?
620 case "${need_opcodes}" in
622 OPCODES_LIB=../opcodes/libopcodes.la
626 case "${need_bfd}" in
628 BFDLIB=../bfd/libbfd.la
629 ALL_OBJ_DEPS="$ALL_OBJ_DEPS ../bfd/bfd.h"
634 AC_SUBST(OPCODES_LIB)
636 AC_SUBST(ALL_OBJ_DEPS)
638 AC_DEFINE_UNQUOTED(TARGET_ALIAS, "${target_alias}")
639 AC_DEFINE_UNQUOTED(TARGET_CANONICAL, "${target}")
640 AC_DEFINE_UNQUOTED(TARGET_CPU, "${target_cpu}")
641 AC_DEFINE_UNQUOTED(TARGET_VENDOR, "${target_vendor}")
642 AC_DEFINE_UNQUOTED(TARGET_OS, "${target_os}")
656 AC_CHECK_HEADERS(string.h stdlib.h memory.h strings.h unistd.h stdarg.h varargs.h errno.h sys/types.h)
658 # Put this here so that autoconf's "cross-compiling" message doesn't confuse
659 # people who are not cross-compiling but are compiling cross-assemblers.
660 AC_MSG_CHECKING(whether compiling a cross-assembler)
661 if test "${host}" = "${target}"; then
665 AC_DEFINE(CROSS_COMPILE)
667 AC_MSG_RESULT($cross_gas)
669 dnl ansidecl.h will deal with const
674 # VMS doesn't have unlink.
675 AC_CHECK_FUNCS(unlink remove, break)
677 # Some systems don't have sbrk().
680 # Some non-ANSI preprocessors botch requoting inside strings. That's bad
681 # enough, but on some of those systems, the assert macro relies on requoting
685 # On some systems, the system header files may not declare malloc, realloc,
686 # and free. There are places where gas needs these functions to have been
687 # declared -- such as when taking their addresses.
695 #ifdef HAVE_STRINGS_H
706 GAS_CHECK_DECL_NEEDED(strstr, f, char *(*f)(), $gas_test_headers)
707 GAS_CHECK_DECL_NEEDED(malloc, f, char *(*f)(), $gas_test_headers)
708 GAS_CHECK_DECL_NEEDED(free, f, void (*f)(), $gas_test_headers)
709 GAS_CHECK_DECL_NEEDED(sbrk, f, char *(*f)(), $gas_test_headers)
711 # Does errno.h declare errno, or do we have to add a separate declaration
713 GAS_CHECK_DECL_NEEDED(errno, f, int f, [
719 dnl This must come last.
721 dnl We used to make symlinks to files in the source directory, but now
722 dnl we just use the right name for .c files, and create .h files in
723 dnl the build directory which include the right .h file. Make sure
724 dnl the old symlinks don't exist, so that a reconfigure in an existing
725 dnl directory behaves reasonably.
727 AC_OUTPUT(Makefile doc/Makefile .gdbinit:gdbinit.in po/Makefile.in:po/Make-in,
728 [rm -f targ-cpu.c targ-cpu.h obj-format.h obj-format.c targ-env.h atof-targ.c itbl-cpu.h
729 echo '#include "tc-'"${target_cpu_type}"'.h"' > targ-cpu.h
730 echo '#include "obj-'"${obj_format}"'.h"' > obj-format.h
731 echo '#include "te-'"${te_file}"'.h"' > targ-env.h
732 echo '#include "itbl-'"${target_cpu_type}"'.h"' > itbl-cpu.h
733 case ${target_cpu_type} in
734 m32r | fr30) echo '#include "opcodes/'"${target_cpu_type}"'-opc.h"' > cgen-opc.h ;;
737 sed -e '/POTFILES =/r po/POTFILES' po/Makefile.in > po/Makefile],
738 [target_cpu_type=${target_cpu_type}
739 obj_format=${obj_format}