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