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