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