* configure.in: Bump version number to 2.9.5.
[deliverable/binutils-gdb.git] / ld / configure.in
CommitLineData
252b5132
RH
1dnl Process this file with autoconf to produce a configure script
2dnl
3AC_PREREG(2.13)
4AC_INIT(ldmain.c)
5
6AC_CANONICAL_SYSTEM
7
8AM_INIT_AUTOMAKE(ld, 2.9.4)
9
10AM_PROG_LIBTOOL
11
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
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
27
28AM_CONFIG_HEADER(config.h:config.in)
29
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
36
37# host-specific stuff:
38
39AC_PROG_CC
40AC_PROG_INSTALL
41
42ALL_LINGUAS=
43CY_GNU_GETTEXT
44
45AC_EXEEXT
46
47AC_PROG_YACC
48AM_PROG_LEX
49
50AM_MAINTAINER_MODE
51
52. ${srcdir}/configure.host
53
54AC_SUBST(HDEFINES)
55AC_SUBST(HOSTING_CRT0)
56AC_SUBST(HOSTING_LIBS)
57AC_SUBST(NATIVE_LIB_DIRS)
58
59AC_CHECK_HEADERS(string.h strings.h stdlib.h unistd.h)
60AC_CHECK_FUNCS(sbrk)
61AC_HEADER_DIRENT
62
63BFD_BINARY_FOPEN
64
65BFD_NEED_DECLARATION(strstr)
66BFD_NEED_DECLARATION(free)
67BFD_NEED_DECLARATION(sbrk)
68BFD_NEED_DECLARATION(getenv)
69BFD_NEED_DECLARATION(environ)
70
71# target-specific stuff:
72
73all_targets=
74EMUL=
75all_emuls=
76all_emul_extras=
ba2be581 77all_libpath=
252b5132
RH
78
79dnl We need to get an arbitrary number of tdir definitions into
80dnl Makefile. We can't do it using AC_SUBST, because autoconf does
81dnl not permit literal newlines in an AC_SUBST variables. So we use a
82dnl file.
83rm -f tdirs
84
85for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'`
86do
87 if test "$targ_alias" = "all"; then
88 all_targets=true
89 else
90 # Canonicalize the secondary target names.
91 result=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $targ_alias 2>/dev/null`
92 if test -n "$result"; then
93 targ=$result
94 else
95 targ=$targ_alias
96 fi
97
98 . ${srcdir}/configure.tgt
99
100 if test "$targ" = "$target"; then
101 EMUL=$targ_emul
102 fi
103
3336653a 104 for i in $targ_emul $targ_extra_emuls $targ_extra_libpath; do
252b5132
RH
105 case " $all_emuls " in
106 *" e${i}.o "*) ;;
107 *)
108 all_emuls="$all_emuls e${i}.o"
109 eval result=\$tdir_$i
110 test -z "$result" && result=$targ_alias
111 echo tdir_$i=$result >> tdirs
112 ;;
113 esac
114 done
115
ba2be581 116 for i in $targ_emul $targ_extra_libpath; do
3336653a
RH
117 case " $all_libpath " in
118 *" ${i} "*) ;;
119 *)
ba2be581
RH
120 if test -z "$all_libpath"; then
121 all_libpath=${i}
122 else
123 all_libpath="$all_libpath ${i}"
124 fi
3336653a
RH
125 ;;
126 esac
127 done
128
252b5132
RH
129 for i in $targ_extra_ofiles; do
130 case " $all_emul_extras " in
131 *" ${i} "*) ;;
132 *)
133 all_emul_extras="$all_emul_extras ${i}"
134 ;;
135 esac
136 done
137 fi
138done
139
140AC_SUBST(EMUL)
141
142TDIRS=tdirs
143AC_SUBST_FILE(TDIRS)
144
145dnl FIXME: We will build a 64 bit BFD for a 64 bit host or a 64 bit
146dnl target, and in those cases we should also build the 64 bit
147dnl emulations.
148if test x${all_targets} = xtrue; then
149 if test x${want64} = xtrue; then
150 EMULATION_OFILES='$(ALL_EMULATIONS) $(ALL_64_EMULATIONS)'
151 else
152 EMULATION_OFILES='$(ALL_EMULATIONS)'
153 fi
154 EMUL_EXTRA_OFILES='$(ALL_EMUL_EXTRA_OFILES)'
155else
156 EMULATION_OFILES=$all_emuls
157 EMUL_EXTRA_OFILES=$all_emul_extras
158fi
159AC_SUBST(EMULATION_OFILES)
160AC_SUBST(EMUL_EXTRA_OFILES)
161
3336653a
RH
162EMULATION_LIBPATH=$all_libpath
163AC_SUBST(EMULATION_LIBPATH)
164
252b5132
RH
165if test x${enable_static} = xno; then
166 TESTBFDLIB="--rpath ../bfd/.libs ../bfd/.libs/libbfd.so"
167else
168 TESTBFDLIB="../bfd/.libs/libbfd.a"
169fi
170AC_SUBST(TESTBFDLIB)
171
172AC_OUTPUT(Makefile po/Makefile.in:po/Make-in,
173[sed -e '/POTFILES =/r po/POTFILES' po/Makefile.in > po/Makefile])
This page took 0.033331 seconds and 4 git commands to generate.