* ecoff.c (_bfd_ecoff_new_section_hook): Handle .rconst section.
[deliverable/binutils-gdb.git] / ld / configure.in
1 dnl Process this file with autoconf to produce a configure script
2 dnl
3 AC_PREREG(2.0)
4 AC_INIT(ldmain.c)
5
6 AC_ARG_ENABLE(targets,
7 [ --enable-targets alternative target configurations],
8 [case "${enableval}" in
9 yes | "") AC_ERROR(enable-targets option must specify target names or 'all')
10 ;;
11 no) enable_targets= ;;
12 *) enable_targets=$enableval ;;
13 esac])dnl
14
15 AC_CONFIG_HEADER(config.h:config.in)
16
17 AC_CONFIG_AUX_DIR(`cd $srcdir/..; pwd`)
18 AC_CANONICAL_SYSTEM
19 if test -z "$target" ; then
20 AC_MSG_ERROR(Unrecognized target system type; please check config.sub.)
21 fi
22 if test -z "$host" ; then
23 AC_MSG_ERROR(Unrecognized host system type; please check config.sub.)
24 fi
25 AC_ARG_PROGRAM
26
27 # host-specific stuff:
28
29 . ${srcdir}/configure.host
30
31 AC_PROG_CC
32 AC_SUBST(CFLAGS)
33 AC_SUBST(HDEFINES)
34 AC_SUBST(HOSTING_CRT0)
35 AC_SUBST(HOSTING_LIBS)
36 AC_SUBST(NATIVE_LIB_DIRS)
37
38 AC_CHECK_HEADERS(string.h strings.h stdlib.h unistd.h)
39 AC_CHECK_FUNCS(sbrk)
40
41 BFD_BINARY_FOPEN
42
43 # target-specific stuff:
44
45 # Canonicalize the secondary target names.
46 if test -n "$enable_targets"; then
47 for targ in `echo $enable_targets | sed 's/,/ /g'`
48 do
49 result=`$ac_config_sub $targ 2>/dev/null`
50 if test -n "$result"; then
51 canon_targets="$canon_targets $result"
52 else
53 # Allow targets that config.sub doesn't recognize, like "all".
54 canon_targets="$canon_targets $targ"
55 fi
56 done
57 fi
58
59 all_targets=false
60 EMUL=
61 all_emuls=
62
63 for targ in $target $canon_targets
64 do
65 if test "x$targ" = "xall"; then
66 all_targets=true
67 else
68 . ${srcdir}/configure.tgt
69
70 if test "x$targ" = "x$target"; then
71 EMUL=${targ_emul}
72 fi
73
74 all_emuls="${all_emuls} ${targ_emul} ${targ_extra_emuls}"
75 fi
76 done
77
78 AC_SUBST(EMUL)
79
80 if test x${all_targets} = xfalse; then
81 # uniq the list.
82 f=""
83 for i in $all_emuls ; do
84 case " $f " in
85 *" e$i.o "*) ;;
86 *) f="$f e$i.o" ;;
87 esac
88 done
89
90 EMULATION_OFILES="$f"
91
92 else # all_targets is true
93 EMULATION_OFILES='$(ALL_EMULATIONS)'
94 fi # all_targets is true
95
96 AC_SUBST(EMULATION_OFILES)
97
98 AC_OUTPUT(Makefile,
99 [case x$CONFIG_HEADERS in xconfig.h:config.in) echo > stamp-h ;; esac])
This page took 0.030368 seconds and 4 git commands to generate.