Commit | Line | Data |
---|---|---|
252b5132 RH |
1 | dnl Process this file with autoconf to produce a configure script. |
2 | dnl | |
b90efa5b | 3 | dnl Copyright (C) 2012-2015 Free Software Foundation, Inc. |
5bf135a7 NC |
4 | dnl |
5 | dnl This file is free software; you can redistribute it and/or modify | |
6 | dnl it under the terms of the GNU General Public License as published by | |
7 | dnl the Free Software Foundation; either version 3 of the License, or | |
8 | dnl (at your option) any later version. | |
9 | dnl | |
10 | dnl This program is distributed in the hope that it will be useful, | |
11 | dnl but WITHOUT ANY WARRANTY; without even the implied warranty of | |
12 | dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
13 | dnl GNU General Public License for more details. | |
14 | dnl | |
15 | dnl You should have received a copy of the GNU General Public License | |
16 | dnl along with this program; see the file COPYING3. If not see | |
17 | dnl <http://www.gnu.org/licenses/>. | |
18 | dnl | |
19 | ||
da594c4a | 20 | AC_PREREQ(2.59) |
2e98a7bd AM |
21 | m4_include([../bfd/version.m4]) |
22 | AC_INIT([binutils], BFD_VERSION) | |
da594c4a | 23 | AC_CONFIG_SRCDIR(ar.c) |
252b5132 | 24 | |
da594c4a | 25 | AC_CANONICAL_TARGET |
5d64ca4e | 26 | AC_ISC_POSIX |
252b5132 | 27 | |
2e98a7bd | 28 | AM_INIT_AUTOMAKE |
252b5132 | 29 | |
d45dc31f SE |
30 | AC_PROG_CC |
31 | AC_GNU_SOURCE | |
7357c5b6 | 32 | AC_USE_SYSTEM_EXTENSIONS |
e3525117 | 33 | |
da594c4a | 34 | LT_INIT |
b879806f | 35 | ACX_LARGEFILE |
252b5132 RH |
36 | |
37 | AC_ARG_ENABLE(targets, | |
38 | [ --enable-targets alternative target configurations], | |
39 | [case "${enableval}" in | |
da594c4a | 40 | yes | "") AC_MSG_ERROR(enable-targets option must specify target names or 'all') |
252b5132 RH |
41 | ;; |
42 | no) enable_targets= ;; | |
43 | *) enable_targets=$enableval ;; | |
44 | esac])dnl | |
252b5132 | 45 | |
9cb80f72 RM |
46 | AC_ARG_ENABLE(deterministic-archives, |
47 | [AS_HELP_STRING([--enable-deterministic-archives], | |
48 | [ar and ranlib default to -D behavior])], [ | |
49 | if test "${enableval}" = no; then | |
50 | default_ar_deterministic=0 | |
51 | else | |
52 | default_ar_deterministic=1 | |
53 | fi], [default_ar_deterministic=0]) | |
54 | ||
55 | AC_DEFINE_UNQUOTED(DEFAULT_AR_DETERMINISTIC, $default_ar_deterministic, | |
56 | [Should ar and ranlib use -D behavior by default?]) | |
57 | ||
7fac9594 NC |
58 | AC_ARG_ENABLE(default-strings-all, |
59 | [AS_HELP_STRING([--disable-default-strings-all], | |
60 | [strings defaults to --data behavior])], [ | |
61 | if test "${enableval}" = no; then | |
62 | default_strings_all=0 | |
63 | else | |
64 | default_strings_all=1 | |
65 | fi], [default_strings_all=1]) | |
66 | ||
67 | AC_DEFINE_UNQUOTED(DEFAULT_STRINGS_ALL, $default_strings_all, | |
68 | [Should strings use -a behavior by default?]) | |
69 | ||
398ee8f1 | 70 | AM_BINUTILS_WARNINGS |
9cb80f72 | 71 | |
da594c4a | 72 | AC_CONFIG_HEADERS(config.h:config.in) |
252b5132 | 73 | |
df7b86aa NC |
74 | AH_VERBATIM([00_CONFIG_H_CHECK], |
75 | [/* Check that config.h is #included before system headers | |
76 | (this works only for glibc, but that should be enough). */ | |
e6f88107 | 77 | #if defined(__GLIBC__) && !defined(__FreeBSD_kernel__) && !defined(__CONFIG_H__) |
df7b86aa | 78 | # error config.h must be #included before system headers |
e6f88107 AM |
79 | #endif |
80 | #define __CONFIG_H__ 1]) | |
df7b86aa | 81 | |
252b5132 RH |
82 | if test -z "$target" ; then |
83 | AC_MSG_ERROR(Unrecognized target system type; please check config.sub.) | |
84 | fi | |
85 | if test -z "$host" ; then | |
86 | AC_MSG_ERROR(Unrecognized host system type; please check config.sub.) | |
87 | fi | |
88 | ||
252b5132 RH |
89 | AC_PROG_YACC |
90 | AM_PROG_LEX | |
91 | ||
31f7d8fd | 92 | ALL_LINGUAS="bg da es fi fr id it ja ro ru rw sk sv tr uk vi zh_CN zh_TW hr" |
20e95c23 DJ |
93 | ZW_GNU_GETTEXT_SISTER_DIR |
94 | AM_PO_SUBDIRS | |
252b5132 RH |
95 | |
96 | AM_MAINTAINER_MODE | |
d5fbea21 | 97 | AM_CONDITIONAL(GENINSRC_NEVER, false) |
252b5132 | 98 | AC_EXEEXT |
2481e6a2 ILT |
99 | if test -n "$EXEEXT"; then |
100 | AC_DEFINE(HAVE_EXECUTABLE_SUFFIX, 1, | |
101 | [Does the platform use an executable suffix?]) | |
102 | fi | |
bb0cb4db ILT |
103 | AC_DEFINE_UNQUOTED(EXECUTABLE_SUFFIX, "${EXEEXT}", |
104 | [Suffix used for executables, if any.]) | |
252b5132 RH |
105 | |
106 | # host-specific stuff: | |
107 | ||
108 | HDEFINES= | |
109 | ||
110 | . ${srcdir}/../bfd/configure.host | |
111 | ||
112 | AC_SUBST(HDEFINES) | |
113 | AR=${AR-ar} | |
114 | AC_SUBST(AR) | |
115 | AC_PROG_RANLIB | |
116 | AC_PROG_INSTALL | |
117 | ||
118 | BFD_CC_FOR_BUILD | |
119 | ||
8a965946 ILT |
120 | DEMANGLER_NAME=c++filt |
121 | case "${host}" in | |
122 | *-*-go32* | *-*-msdos*) | |
123 | DEMANGLER_NAME=cxxfilt | |
124 | esac | |
125 | AC_SUBST(DEMANGLER_NAME) | |
126 | ||
4c219c2e AM |
127 | AC_CHECK_SIZEOF([long]) |
128 | AC_CHECK_TYPES([long long], [AC_CHECK_SIZEOF(long long)]) | |
129 | ||
3bfcb652 | 130 | AC_CHECK_HEADERS(string.h strings.h stdlib.h unistd.h fcntl.h sys/file.h limits.h locale.h sys/param.h wchar.h) |
252b5132 | 131 | AC_HEADER_SYS_WAIT |
208a4923 | 132 | ACX_HEADER_STRING |
252b5132 | 133 | AC_FUNC_ALLOCA |
44350750 | 134 | AC_CHECK_FUNCS(sbrk utimes setmode getc_unlocked strcoll setlocale) |
f9c026a8 NC |
135 | AC_CHECK_FUNC([mkstemp], |
136 | AC_DEFINE([HAVE_MKSTEMP], 1, | |
137 | [Define to 1 if you have the `mkstemp' function.])) | |
138 | AC_CHECK_FUNC([mkdtemp], | |
139 | AC_DEFINE([HAVE_MKDTEMP], 1, | |
140 | [Define to 1 if you have the `mkdtemp' function.])) | |
3bfcb652 NC |
141 | AC_MSG_CHECKING([for mbstate_t]) |
142 | AC_TRY_COMPILE([#include <wchar.h>], | |
143 | [mbstate_t teststate;], | |
144 | have_mbstate_t=yes, have_mbstate_t=no) | |
145 | AC_MSG_RESULT($have_mbstate_t) | |
146 | if test x"$have_mbstate_t" = xyes; then | |
147 | AC_DEFINE(HAVE_MBSTATE_T,1,[Define if mbstate_t exists in wchar.h.]) | |
148 | fi | |
cedd9a58 | 149 | |
f353eb8a | 150 | # Some systems have frexp only in -lm, not in -lc. |
07735828 | 151 | AC_SEARCH_LIBS(frexp, m) |
f353eb8a | 152 | |
44350750 NC |
153 | AM_LC_MESSAGES |
154 | ||
252b5132 RH |
155 | AC_MSG_CHECKING(for time_t in time.h) |
156 | AC_CACHE_VAL(bu_cv_decl_time_t_time_h, | |
da594c4a | 157 | [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <time.h>], [time_t i;])], |
252b5132 RH |
158 | bu_cv_decl_time_t_time_h=yes, bu_cv_decl_time_t_time_h=no)]) |
159 | AC_MSG_RESULT($bu_cv_decl_time_t_time_h) | |
160 | if test $bu_cv_decl_time_t_time_h = yes; then | |
161 | AC_DEFINE([HAVE_TIME_T_IN_TIME_H], 1, | |
162 | [Is the type time_t defined in <time.h>?]) | |
163 | fi | |
164 | ||
165 | AC_MSG_CHECKING(for time_t in sys/types.h) | |
166 | AC_CACHE_VAL(bu_cv_decl_time_t_types_h, | |
da594c4a | 167 | [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <sys/types.h>], [time_t i;])], |
252b5132 RH |
168 | bu_cv_decl_time_t_types_h=yes, bu_cv_decl_time_t_types_h=no)]) |
169 | AC_MSG_RESULT($bu_cv_decl_time_t_types_h) | |
170 | if test $bu_cv_decl_time_t_types_h = yes; then | |
171 | AC_DEFINE([HAVE_TIME_T_IN_TYPES_H], 1, | |
172 | [Is the type time_t defined in <sys/types.h>?]) | |
173 | fi | |
174 | ||
e46eba98 NC |
175 | AC_MSG_CHECKING(for a known getopt prototype in unistd.h) |
176 | AC_CACHE_VAL(bu_cv_decl_getopt_unistd_h, | |
da594c4a | 177 | [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <unistd.h>], [extern int getopt (int, char *const*, const char *);])], |
e46eba98 NC |
178 | bu_cv_decl_getopt_unistd_h=yes, bu_cv_decl_getopt_unistd_h=no)]) |
179 | AC_MSG_RESULT($bu_cv_decl_getopt_unistd_h) | |
180 | if test $bu_cv_decl_getopt_unistd_h = yes; then | |
181 | AC_DEFINE([HAVE_DECL_GETOPT], 1, | |
182 | [Is the prototype for getopt in <unistd.h> in the expected format?]) | |
183 | fi | |
184 | ||
252b5132 RH |
185 | # Under Next 3.2 <utime.h> apparently does not define struct utimbuf |
186 | # by default. | |
187 | AC_MSG_CHECKING([for utime.h]) | |
188 | AC_CACHE_VAL(bu_cv_header_utime_h, | |
da594c4a | 189 | [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <sys/types.h> |
252b5132 RH |
190 | #ifdef HAVE_TIME_H |
191 | #include <time.h> | |
192 | #endif | |
193 | #include <utime.h>], | |
da594c4a | 194 | [struct utimbuf s;])], |
252b5132 RH |
195 | bu_cv_header_utime_h=yes, bu_cv_header_utime_h=no)]) |
196 | AC_MSG_RESULT($bu_cv_header_utime_h) | |
197 | if test $bu_cv_header_utime_h = yes; then | |
198 | AC_DEFINE(HAVE_GOOD_UTIME_H, 1, [Does <utime.h> define struct utimbuf?]) | |
199 | fi | |
200 | ||
952781e8 AM |
201 | AC_CHECK_DECLS([environ, fprintf, getc_unlocked, getenv, |
202 | sbrk, snprintf, stpcpy, strnlen, strstr, vsnprintf]) | |
252b5132 | 203 | |
ed2b5077 L |
204 | # Link in zlib if we can. This allows us to read compressed debug |
205 | # sections. This is used only by readelf.c (objdump uses bfd for | |
206 | # reading compressed sections). | |
207 | AM_ZLIB | |
1b315056 | 208 | |
252b5132 RH |
209 | BFD_BINARY_FOPEN |
210 | ||
211 | # target-specific stuff: | |
212 | ||
213 | # Canonicalize the secondary target names. | |
214 | if test -n "$enable_targets"; then | |
215 | for targ in `echo $enable_targets | sed 's/,/ /g'` | |
216 | do | |
6d83c84b | 217 | result=`$ac_config_sub $targ 2>/dev/null` |
252b5132 RH |
218 | if test -n "$result"; then |
219 | canon_targets="$canon_targets $result" | |
220 | else | |
221 | # Allow targets that config.sub doesn't recognize, like "all". | |
222 | canon_targets="$canon_targets $targ" | |
223 | fi | |
224 | done | |
225 | fi | |
226 | ||
5ba684e2 NC |
227 | AC_CHECK_HEADER(iconv.h) |
228 | AM_ICONV | |
229 | ||
252b5132 RH |
230 | all_targets=false |
231 | BUILD_NLMCONV= | |
232 | NLMCONV_DEFS= | |
233 | BUILD_SRCONV= | |
234 | BUILD_DLLTOOL= | |
235 | DLLTOOL_DEFS= | |
7aad4c3d | 236 | DLLTOOL_DEFAULT= |
252b5132 | 237 | BUILD_WINDRES= |
692ed3e7 | 238 | BUILD_WINDMC= |
252b5132 RH |
239 | BUILD_DLLWRAP= |
240 | BUILD_MISC= | |
1d97d67f | 241 | BUILD_INSTALL_MISC= |
8b1e6df3 | 242 | OBJDUMP_DEFS= |
6abcee90 TG |
243 | OBJDUMP_PRIVATE_VECTORS= |
244 | OBJDUMP_PRIVATE_OFILES= | |
245 | od_vectors= | |
252b5132 RH |
246 | |
247 | for targ in $target $canon_targets | |
248 | do | |
249 | if test "x$targ" = "xall"; then | |
250 | all_targets=true | |
251 | BUILD_NLMCONV='$(NLMCONV_PROG)$(EXEEXT)' | |
252 | BUILD_SRCONV='$(SRCONV_PROG)' | |
253 | NLMCONV_DEFS="-DNLMCONV_I386 -DNLMCONV_ALPHA -DNLMCONV_POWERPC -DNLMCONV_SPARC" | |
1d97d67f | 254 | BUILD_MISC="${BUILD_MISC} "'bin2c$(EXEEXT_FOR_BUILD)' |
003bc0ba NC |
255 | BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)' |
256 | BUILD_WINDMC='$(WINDMC_PROG)$(EXEEXT)' | |
257 | BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)' | |
258 | if test -z "$DLLTOOL_DEFAULT"; then | |
259 | DLLTOOL_DEFAULT="-DDLLTOOL_DEFAULT_I386" | |
260 | fi | |
261 | DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_I386" | |
262 | BUILD_DLLWRAP='$(DLLWRAP_PROG)$(EXEEXT)' | |
6abcee90 | 263 | od_vectors="$od_vectors objdump_private_desc_xcoff" |
252b5132 RH |
264 | else |
265 | case $targ in | |
266 | changequote(,)dnl | |
9cb80f72 | 267 | i[3-7]86*-*-netware*) |
252b5132 RH |
268 | changequote([,])dnl |
269 | BUILD_NLMCONV='$(NLMCONV_PROG)$(EXEEXT)' | |
270 | NLMCONV_DEFS="$NLMCONV_DEFS -DNLMCONV_I386" | |
271 | ;; | |
272 | alpha*-*-netware*) | |
273 | BUILD_NLMCONV='$(NLMCONV_PROG)$(EXEEXT)' | |
274 | NLMCONV_DEFS="$NLMCONV_DEFS -DNLMCONV_ALPHA" | |
275 | ;; | |
276 | powerpc*-*-netware*) | |
277 | BUILD_NLMCONV='$(NLMCONV_PROG)$(EXEEXT)' | |
278 | NLMCONV_DEFS="$NLMCONV_DEFS -DNLMCONV_POWERPC" | |
279 | ;; | |
280 | sparc*-*-netware*) | |
281 | BUILD_NLMCONV='$(NLMCONV_PROG)$(EXEEXT)' | |
282 | NLMCONV_DEFS="$NLMCONV_DEFS -DNLMCONV_SPARC" | |
283 | ;; | |
284 | esac | |
6abcee90 | 285 | |
252b5132 RH |
286 | case $targ in |
287 | *-*-hms*) BUILD_SRCONV='$(SRCONV_PROG)' ;; | |
288 | esac | |
6abcee90 | 289 | |
252b5132 | 290 | case $targ in |
a8c548cb NC |
291 | arm-epoc-pe*) |
292 | BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)' | |
7aad4c3d L |
293 | if test -z "$DLLTOOL_DEFAULT"; then |
294 | DLLTOOL_DEFAULT="-DDLLTOOL_DEFAULT_ARM_EPOC" | |
295 | fi | |
a8c548cb NC |
296 | DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_ARM_EPOC -DDLLTOOL_ARM" |
297 | BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)' | |
692ed3e7 | 298 | BUILD_WINDMC='$(WINDMC_PROG)$(EXEEXT)' |
a8c548cb | 299 | ;; |
361dff73 | 300 | arm-wince-pe* | arm-*-wince | arm*-*-cegcc* | arm*-*-mingw32ce*) |
7148cc28 | 301 | BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)' |
7aad4c3d L |
302 | if test -z "$DLLTOOL_DEFAULT"; then |
303 | DLLTOOL_DEFAULT="-DDLLTOOL_DEFAULT_ARM_WINCE" | |
304 | fi | |
7148cc28 NC |
305 | DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_ARM_WINCE -DDLLTOOL_ARM" |
306 | BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)' | |
692ed3e7 | 307 | BUILD_WINDMC='$(WINDMC_PROG)$(EXEEXT)' |
7148cc28 NC |
308 | ;; |
309 | arm-*-pe*) | |
252b5132 | 310 | BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)' |
7aad4c3d L |
311 | if test -z "$DLLTOOL_DEFAULT"; then |
312 | DLLTOOL_DEFAULT="-DDLLTOOL_DEFAULT_ARM" | |
313 | fi | |
252b5132 RH |
314 | DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_ARM" |
315 | BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)' | |
692ed3e7 | 316 | BUILD_WINDMC='$(WINDMC_PROG)$(EXEEXT)' |
7a7b06ef | 317 | ;; |
ee36d918 | 318 | x86_64-*-mingw* | x86_64-*-cygwin*) |
99ad8390 | 319 | BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)' |
7aad4c3d L |
320 | if test -z "$DLLTOOL_DEFAULT"; then |
321 | DLLTOOL_DEFAULT="-DDLLTOOL_DEFAULT_MX86_64" | |
322 | fi | |
99ad8390 NC |
323 | DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_MX86_64" |
324 | BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)' | |
692ed3e7 | 325 | BUILD_WINDMC='$(WINDMC_PROG)$(EXEEXT)' |
99ad8390 NC |
326 | BUILD_DLLWRAP='$(DLLWRAP_PROG)$(EXEEXT)' |
327 | ;; | |
252b5132 | 328 | changequote(,)dnl |
80c7c40a | 329 | i[3-7]86-*-pe* | i[3-7]86-*-cygwin* | i[3-7]86-*-mingw32** | i[3-7]86-*-netbsdpe*) |
252b5132 RH |
330 | changequote([,])dnl |
331 | BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)' | |
7aad4c3d L |
332 | if test -z "$DLLTOOL_DEFAULT"; then |
333 | DLLTOOL_DEFAULT="-DDLLTOOL_DEFAULT_I386" | |
334 | fi | |
252b5132 RH |
335 | DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_I386" |
336 | BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)' | |
692ed3e7 | 337 | BUILD_WINDMC='$(WINDMC_PROG)$(EXEEXT)' |
252b5132 | 338 | BUILD_DLLWRAP='$(DLLWRAP_PROG)$(EXEEXT)' |
7a7b06ef | 339 | ;; |
80c7c40a NC |
340 | changequote(,)dnl |
341 | i[3-7]86-*-interix) | |
342 | changequote([,])dnl | |
7a7b06ef | 343 | BUILD_DLLTOOL='$(DLLTOOL_PROG)' |
7aad4c3d L |
344 | if test -z "$DLLTOOL_DEFAULT"; then |
345 | DLLTOOL_DEFAULT="-DDLLTOOL_DEFAULT_I386" | |
346 | fi | |
7a7b06ef ILT |
347 | DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_I386" |
348 | ;; | |
f0660b73 NC |
349 | changequote(,)dnl |
350 | powerpc*-aix5.[01]) | |
351 | changequote([,])dnl | |
352 | ;; | |
e5231592 RS |
353 | changequote(,)dnl |
354 | powerpc*-aix[5-9].*) | |
355 | changequote([,])dnl | |
f0660b73 NC |
356 | OBJDUMP_DEFS="-DAIX_WEAK_SUPPORT" |
357 | ;; | |
e1d5b1e7 | 358 | powerpc*-*-pe* | powerpc*-*-cygwin*) |
252b5132 | 359 | BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)' |
7aad4c3d L |
360 | if test -z "$DLLTOOL_DEFAULT"; then |
361 | DLLTOOL_DEFAULT="-DDLLTOOL_DEFAULT_PPC" | |
362 | fi | |
252b5132 RH |
363 | DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_PPC" |
364 | BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)' | |
692ed3e7 | 365 | BUILD_WINDMC='$(WINDMC_PROG)$(EXEEXT)' |
7a7b06ef | 366 | ;; |
59678365 | 367 | powerpc*-*-linux* | powerpc*-*-elf* | powerpc*-*-eabi*) |
1ab52cbe AM |
368 | case "$BUILD_INSTALL_MISC" in |
369 | *embedspu*) ;; | |
370 | *) BUILD_INSTALL_MISC="${BUILD_INSTALL_MISC} embedspu" | |
371 | esac | |
669a9a2a | 372 | ;; |
e1d5b1e7 | 373 | sh*-*-pe) |
8a0e0f38 | 374 | BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)' |
7aad4c3d L |
375 | if test -z "$DLLTOOL_DEFAULT"; then |
376 | DLLTOOL_DEFAULT="-DDLLTOOL_DEFAULT_SH" | |
377 | fi | |
8a0e0f38 NC |
378 | DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_SH" |
379 | BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)' | |
692ed3e7 | 380 | BUILD_WINDMC='$(WINDMC_PROG)$(EXEEXT)' |
8a0e0f38 | 381 | ;; |
cd14b966 | 382 | spu-*-*) |
1d97d67f | 383 | BUILD_MISC="${BUILD_MISC} "'bin2c$(EXEEXT_FOR_BUILD)' |
cd14b966 | 384 | ;; |
e1d5b1e7 | 385 | mips*-*-pe) |
8a0e0f38 | 386 | BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)' |
7aad4c3d L |
387 | if test -z "$DLLTOOL_DEFAULT"; then |
388 | DLLTOOL_DEFAULT="-DDLLTOOL_DEFAULT_MIPS" | |
389 | fi | |
8a0e0f38 NC |
390 | DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_MIPS" |
391 | BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)' | |
692ed3e7 | 392 | BUILD_WINDMC='$(WINDMC_PROG)$(EXEEXT)' |
8a0e0f38 | 393 | ;; |
27a710e5 | 394 | mcore-*-pe) |
661016bb | 395 | BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)' |
7aad4c3d L |
396 | if test -z "$DLLTOOL_DEFAULT"; then |
397 | DLLTOOL_DEFAULT="-DDLLTOOL_DEFAULT_MCORE" | |
398 | fi | |
661016bb NC |
399 | DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_MCORE" |
400 | BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)' | |
692ed3e7 | 401 | BUILD_WINDMC='$(WINDMC_PROG)$(EXEEXT)' |
7a7b06ef | 402 | ;; |
27a710e5 | 403 | mcore-*-elf) |
661016bb | 404 | BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)' |
7aad4c3d L |
405 | if test -z "$DLLTOOL_DEFAULT"; then |
406 | DLLTOOL_DEFAULT="-DDLLTOOL_DEFAULT_MCORE_ELF" | |
407 | fi | |
661016bb | 408 | DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_MCORE_ELF" |
7a7b06ef | 409 | ;; |
15ab5209 DB |
410 | mep-*) |
411 | OBJDUMP_DEFS="-DSKIP_ZEROES=256 -DSKIP_ZEROES_AT_END=0" | |
412 | ;; | |
252b5132 | 413 | esac |
6abcee90 TG |
414 | |
415 | # Add objdump private vectors. | |
416 | case $targ in | |
6d0cfb9c DC |
417 | avr-*-*) |
418 | od_vectors="$od_vectors objdump_private_desc_elf32_avr" | |
419 | ;; | |
6abcee90 | 420 | powerpc-*-aix*) |
c5012cd8 TG |
421 | od_vectors="$od_vectors objdump_private_desc_xcoff" |
422 | ;; | |
423 | *-*-darwin*) | |
424 | od_vectors="$od_vectors objdump_private_desc_mach_o" | |
6abcee90 TG |
425 | ;; |
426 | esac | |
252b5132 RH |
427 | fi |
428 | done | |
429 | ||
6abcee90 TG |
430 | # Uniq objdump private vector, build objdump target ofiles. |
431 | od_files= | |
432 | f="" | |
433 | for i in $od_vectors ; do | |
434 | case " $f " in | |
435 | *" $i "*) ;; | |
436 | *) | |
437 | f="$f $i" | |
438 | OBJDUMP_PRIVATE_VECTORS="$OBJDUMP_PRIVATE_VECTORS &$i," | |
439 | case $i in | |
6d0cfb9c DC |
440 | objdump_private_desc_elf32_avr) |
441 | od_files="$od_files od-elf32_avr" ;; | |
6abcee90 TG |
442 | objdump_private_desc_xcoff) |
443 | od_files="$od_files od-xcoff" ;; | |
c5012cd8 TG |
444 | objdump_private_desc_mach_o) |
445 | od_files="$od_files od-macho" ;; | |
6abcee90 TG |
446 | *) AC_MSG_ERROR(*** unknown private vector $i) ;; |
447 | esac | |
448 | ;; | |
449 | esac | |
450 | done | |
451 | ||
452 | # Uniq objdump target ofiles | |
453 | f="" | |
454 | for i in $od_files ; do | |
455 | case " $f " in | |
456 | *" $i "*) ;; | |
457 | *) | |
458 | f="$f $i" | |
459 | OBJDUMP_PRIVATE_OFILES="$OBJDUMP_PRIVATE_OFILES $i.$objext" | |
460 | ;; | |
461 | esac | |
462 | done | |
463 | ||
7aad4c3d L |
464 | DLLTOOL_DEFS="$DLLTOOL_DEFS $DLLTOOL_DEFAULT" |
465 | ||
c918cb96 DD |
466 | if test "${with_windres+set}" = set; then |
467 | BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)' | |
468 | fi | |
469 | ||
692ed3e7 NC |
470 | if test "${with_windmc+set}" = set; then |
471 | BUILD_WINDMC='$(WINDMC_PROG)$(EXEEXT)' | |
472 | fi | |
473 | ||
6abcee90 TG |
474 | OBJDUMP_DEFS="${OBJDUMP_DEFS} -DOBJDUMP_PRIVATE_VECTORS=\"${OBJDUMP_PRIVATE_VECTORS}\"" |
475 | ||
252b5132 RH |
476 | AC_SUBST(NLMCONV_DEFS) |
477 | AC_SUBST(BUILD_NLMCONV) | |
478 | AC_SUBST(BUILD_SRCONV) | |
479 | AC_SUBST(BUILD_DLLTOOL) | |
480 | AC_SUBST(DLLTOOL_DEFS) | |
481 | AC_SUBST(BUILD_WINDRES) | |
692ed3e7 | 482 | AC_SUBST(BUILD_WINDMC) |
252b5132 RH |
483 | AC_SUBST(BUILD_DLLWRAP) |
484 | AC_SUBST(BUILD_MISC) | |
1d97d67f | 485 | AC_SUBST(BUILD_INSTALL_MISC) |
8b1e6df3 | 486 | AC_SUBST(OBJDUMP_DEFS) |
6abcee90 | 487 | AC_SUBST(OBJDUMP_PRIVATE_OFILES) |
252b5132 RH |
488 | |
489 | AC_DEFINE_UNQUOTED(TARGET, "${target}", [Configured target name.]) | |
490 | ||
491 | targ=$target | |
492 | . $srcdir/../bfd/config.bfd | |
493 | if test "x$targ_underscore" = "xyes"; then | |
494 | UNDERSCORE=1 | |
495 | else | |
496 | UNDERSCORE=0 | |
497 | fi | |
bb279dc0 ZW |
498 | AC_DEFINE_UNQUOTED(TARGET_PREPENDS_UNDERSCORE, $UNDERSCORE, |
499 | [Define to 1 if user symbol names have a leading underscore, 0 if not.]) | |
252b5132 | 500 | |
9cb80f72 | 501 | # Emulation |
52fbfb5d AM |
502 | targ=$target |
503 | . ${srcdir}/configure.tgt | |
504 | EMULATION=$targ_emul | |
9cb80f72 | 505 | EMULATION_VECTOR=$targ_emul_vector |
eb1e0e80 NC |
506 | |
507 | AC_SUBST(EMULATION) | |
508 | AC_SUBST(EMULATION_VECTOR) | |
509 | ||
108a6f8e CD |
510 | # Required for html and install-html |
511 | AC_SUBST(datarootdir) | |
512 | AC_SUBST(docdir) | |
513 | AC_SUBST(htmldir) | |
31dd3154 | 514 | AC_SUBST(pdfdir) |
108a6f8e | 515 | |
da594c4a AM |
516 | AC_CONFIG_FILES(Makefile doc/Makefile po/Makefile.in:po/Make-in) |
517 | AC_OUTPUT |