Removed superflous code.
[deliverable/binutils-gdb.git] / ld / configure.in
CommitLineData
ef346f1a
ILT
1dnl Process this file with autoconf to produce a configure script
2dnl
b9a5c27f 3AC_PREREG(2.5)
ef346f1a
ILT
4AC_INIT(ldmain.c)
5
49c009b5
ILT
6AC_CANONICAL_SYSTEM
7
eb8061bf 8AM_INIT_AUTOMAKE(ld, 2.9.4)
49c009b5
ILT
9
10AM_PROG_LIBTOOL
11
ef346f1a
ILT
12AC_ARG_ENABLE(targets,
13[ --enable-targets alternative target configurations],
14[case "${enableval}" in
15 yes | "") AC_ERROR(enable-targets option must specify target names or 'all')
16 ;;
17 no) enable_targets= ;;
18 *) enable_targets=$enableval ;;
19esac])dnl
b9a5c27f
RS
20AC_ARG_ENABLE(64-bit-bfd,
21[ --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes)],
22[case "${enableval}" in
23 yes) want64=true ;;
24 no) want64=false ;;
25 *) AC_MSG_ERROR(bad value ${enableval} for 64-bit-bfd option) ;;
26esac],[want64=false])dnl
ef346f1a 27
49c009b5 28AM_CONFIG_HEADER(config.h:config.in)
ef346f1a 29
ef346f1a
ILT
30if test -z "$target" ; then
31 AC_MSG_ERROR(Unrecognized target system type; please check config.sub.)
32fi
33if test -z "$host" ; then
34 AC_MSG_ERROR(Unrecognized host system type; please check config.sub.)
35fi
02757e59 36
ef346f1a 37# host-specific stuff:
02757e59 38
7e19f60e 39AC_PROG_CC
49c009b5 40AM_PROG_INSTALL
8bc8f4bc
TT
41
42ALL_LINGUAS=
43CY_GNU_GETTEXT
44
49c009b5
ILT
45AM_CYGWIN32
46AM_EXEEXT
47
48AC_PROG_YACC
8bc8f4bc 49AM_PROG_LEX
49c009b5
ILT
50
51AM_MAINTAINER_MODE
7e19f60e 52
ef346f1a 53. ${srcdir}/configure.host
02757e59 54
ef346f1a
ILT
55AC_SUBST(HDEFINES)
56AC_SUBST(HOSTING_CRT0)
57AC_SUBST(HOSTING_LIBS)
58AC_SUBST(NATIVE_LIB_DIRS)
8ddef552 59
ef346f1a
ILT
60AC_CHECK_HEADERS(string.h strings.h stdlib.h unistd.h)
61AC_CHECK_FUNCS(sbrk)
2e598345 62AC_HEADER_DIRENT
ab57b174 63
ef346f1a 64BFD_BINARY_FOPEN
02757e59 65
b9a5c27f 66BFD_NEED_DECLARATION(strstr)
2e598345 67BFD_NEED_DECLARATION(free)
b9a5c27f
RS
68BFD_NEED_DECLARATION(sbrk)
69BFD_NEED_DECLARATION(getenv)
2e598345 70
ef346f1a 71# target-specific stuff:
02757e59 72
95d31c3c 73all_targets=
ef346f1a
ILT
74EMUL=
75all_emuls=
eb8061bf 76all_emul_extras=
03abc2bd
ILT
77
78dnl We need to get an arbitrary number of tdir definitions into
79dnl Makefile. We can't do it using AC_SUBST, because autoconf does
80dnl not permit literal newlines in an AC_SUBST variables. So we use a
81dnl file.
82rm -f tdirs
1c4b3cda 83
95d31c3c 84for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'`
1c4b3cda 85do
95d31c3c
ILT
86 if test "$targ_alias" = "all"; then
87 all_targets=true
88 else
89 # Canonicalize the secondary target names.
b9a5c27f 90 result=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $targ_alias 2>/dev/null`
95d31c3c
ILT
91 if test -n "$result"; then
92 targ=$result
1c4b3cda 93 else
95d31c3c
ILT
94 targ=$targ_alias
95 fi
7f2649bb 96
95d31c3c 97 . ${srcdir}/configure.tgt
ef346f1a 98
95d31c3c
ILT
99 if test "$targ" = "$target"; then
100 EMUL=$targ_emul
1c4b3cda 101 fi
1c4b3cda 102
95d31c3c
ILT
103 for i in $targ_emul $targ_extra_emuls; do
104 case " $all_emuls " in
105 *" e${i}.o "*) ;;
106 *)
107 all_emuls="$all_emuls e${i}.o"
108 eval result=\$tdir_$i
109 test -z "$result" && result=$targ_alias
03abc2bd 110 echo tdir_$i=$result >> tdirs
95d31c3c 111 ;;
1c4b3cda
ILT
112 esac
113 done
eb8061bf
DD
114
115 for i in $targ_extra_ofiles; do
116 case " $all_emul_extras " in
117 *" ${i} "*) ;;
118 *)
119 all_emul_extras="$all_emul_extras ${i}"
120 ;;
121 esac
122 done
95d31c3c
ILT
123 fi
124done
1c4b3cda 125
95d31c3c 126AC_SUBST(EMUL)
03abc2bd
ILT
127
128TDIRS=tdirs
129AC_SUBST_FILE(TDIRS)
1c4b3cda 130
b9a5c27f
RS
131dnl FIXME: We will build a 64 bit BFD for a 64 bit host or a 64 bit
132dnl target, and in those cases we should also build the 64 bit
133dnl emulations.
95d31c3c 134if test x${all_targets} = xtrue; then
b9a5c27f
RS
135 if test x${want64} = xtrue; then
136 EMULATION_OFILES='$(ALL_EMULATIONS) $(ALL_64_EMULATIONS)'
137 else
138 EMULATION_OFILES='$(ALL_EMULATIONS)'
139 fi
eb8061bf 140 EMUL_EXTRA_OFILES=''
95d31c3c
ILT
141else
142 EMULATION_OFILES=$all_emuls
eb8061bf 143 EMUL_EXTRA_OFILES=$all_emul_extras
95d31c3c 144fi
ef346f1a 145AC_SUBST(EMULATION_OFILES)
eb8061bf 146AC_SUBST(EMUL_EXTRA_OFILES)
8ddef552 147
8bc8f4bc
TT
148if test x${enable_static} = xno; then
149 TESTBFDLIB="--rpath ../bfd/.libs ../bfd/.libs/libbfd.so"
150else
151 TESTBFDLIB="../bfd/.libs/libbfd.a"
152fi
153AC_SUBST(TESTBFDLIB)
154
155AC_OUTPUT(Makefile po/Makefile.in:po/Make-in,
156[sed -e '/POTFILES =/r po/POTFILES' po/Makefile.in > po/Makefile])
This page took 0.302586 seconds and 4 git commands to generate.