]>
Commit | Line | Data |
---|---|---|
252b5132 RH |
1 | dnl Process this file with autoconf to produce a configure script. |
2 | dnl | |
fd67aa11 | 3 | dnl Copyright (C) 2012-2024 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. | |
3aade688 | 9 | dnl |
5bf135a7 NC |
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. | |
3aade688 | 14 | dnl |
5bf135a7 NC |
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 | ||
2e98a7bd | 20 | m4_include([../bfd/version.m4]) |
301a9420 | 21 | m4_include([../config/debuginfod.m4]) |
3dee0bae | 22 | AC_INIT([binutils], [BFD_VERSION]) |
da594c4a | 23 | AC_CONFIG_SRCDIR(ar.c) |
252b5132 | 24 | |
da594c4a | 25 | AC_CANONICAL_TARGET |
252b5132 | 26 | |
2e98a7bd | 27 | AM_INIT_AUTOMAKE |
d8bbdb9d | 28 | AM_SILENT_RULES([yes]) |
252b5132 | 29 | |
d45dc31f | 30 | AC_PROG_CC |
7357c5b6 | 31 | AC_USE_SYSTEM_EXTENSIONS |
e3525117 | 32 | |
3f8f9745 RJ |
33 | AC_C_BIGENDIAN |
34 | ||
da594c4a | 35 | LT_INIT |
b879806f | 36 | ACX_LARGEFILE |
252b5132 | 37 | |
43e05cd4 AM |
38 | ac_checking= |
39 | . ${srcdir}/../bfd/development.sh | |
40 | test "$development" = true && ac_checking=yes | |
41 | AC_ARG_ENABLE(checking, | |
42 | [ --enable-checking enable run-time checks], | |
43 | [case "${enableval}" in | |
44 | no|none) ac_checking= ;; | |
45 | *) ac_checking=yes ;; | |
46 | esac])dnl | |
47 | if test x$ac_checking != x ; then | |
48 | AC_DEFINE(ENABLE_CHECKING, 1, [Define if you want run-time sanity checks.]) | |
49 | fi | |
50 | ||
252b5132 RH |
51 | AC_ARG_ENABLE(targets, |
52 | [ --enable-targets alternative target configurations], | |
53 | [case "${enableval}" in | |
da594c4a | 54 | yes | "") AC_MSG_ERROR(enable-targets option must specify target names or 'all') |
252b5132 RH |
55 | ;; |
56 | no) enable_targets= ;; | |
57 | *) enable_targets=$enableval ;; | |
58 | esac])dnl | |
252b5132 | 59 | |
e6f6aa8d | 60 | |
9cb80f72 RM |
61 | AC_ARG_ENABLE(deterministic-archives, |
62 | [AS_HELP_STRING([--enable-deterministic-archives], | |
63 | [ar and ranlib default to -D behavior])], [ | |
64 | if test "${enableval}" = no; then | |
65 | default_ar_deterministic=0 | |
66 | else | |
67 | default_ar_deterministic=1 | |
68 | fi], [default_ar_deterministic=0]) | |
69 | ||
70 | AC_DEFINE_UNQUOTED(DEFAULT_AR_DETERMINISTIC, $default_ar_deterministic, | |
71 | [Should ar and ranlib use -D behavior by default?]) | |
72 | ||
e6f6aa8d | 73 | |
7fac9594 NC |
74 | AC_ARG_ENABLE(default-strings-all, |
75 | [AS_HELP_STRING([--disable-default-strings-all], | |
76 | [strings defaults to --data behavior])], [ | |
77 | if test "${enableval}" = no; then | |
78 | default_strings_all=0 | |
79 | else | |
80 | default_strings_all=1 | |
81 | fi], [default_strings_all=1]) | |
82 | ||
83 | AC_DEFINE_UNQUOTED(DEFAULT_STRINGS_ALL, $default_strings_all, | |
84 | [Should strings use -a behavior by default?]) | |
85 | ||
e6f6aa8d NC |
86 | |
87 | AC_ARG_ENABLE(f-for-ifunc-symbols, | |
88 | [AS_HELP_STRING([--enable-f-for-ifunc-symbols], | |
89 | [Have nm use F and f for global and local ifunc symbols])], [ | |
90 | if test "${enableval}" = no; then | |
91 | default_f_for_ifunc=0 | |
92 | else | |
93 | default_f_for_ifunc=1 | |
94 | fi], [default_f_for_ifunc=0]) | |
95 | ||
96 | AC_DEFINE_UNQUOTED(DEFAULT_F_FOR_IFUNC_SYMBOLS, $default_f_for_ifunc, | |
97 | [Have nm use F and f for global and local ifunc symbols]) | |
98 | ||
c46b7066 NC |
99 | |
100 | AC_ARG_ENABLE(follow-debug-links, | |
101 | [AS_HELP_STRING([--enable-follow-debug-links], | |
102 | [Have readelf and objdump follow debug links by default])], [ | |
103 | if test "${enableval}" = no; then | |
104 | default_for_follow_links=0 | |
105 | else | |
106 | default_for_follow_links=1 | |
107 | fi], [default_for_follow_links=1]) | |
108 | ||
109 | AC_DEFINE_UNQUOTED(DEFAULT_FOR_FOLLOW_LINKS, $default_for_follow_links, | |
110 | [Have readelf and objdump follow debug links by default]) | |
111 | ||
112 | ||
18bf5643 NC |
113 | |
114 | ||
115 | AC_ARG_ENABLE(colored-disassembly, | |
116 | [AS_HELP_STRING([--enable-colored-disassembly], | |
117 | [Have objdump use colors in its disassembly by default])], [ | |
118 | if test "${enableval}" = no; then | |
119 | default_for_colored_disassembly=0 | |
120 | else | |
121 | default_for_colored_disassembly=1 | |
122 | fi], [default_for_colored_disassembly=0]) | |
123 | ||
124 | AC_DEFINE_UNQUOTED(DEFAULT_FOR_COLORED_DISASSEMBLY, $default_for_colored_disassembly, | |
125 | [Have objdump use colors in its disassembly by default]) | |
126 | ||
127 | ||
e6f6aa8d NC |
128 | AC_DEBUGINFOD |
129 | ||
094e34f2 NA |
130 | GCC_ENABLE([libctf], [yes], [], [Handle .ctf type-info sections]) |
131 | if test "${enable_libctf}" = yes; then | |
132 | AC_DEFINE(ENABLE_LIBCTF, 1, [Handle .ctf type-info sections]) | |
133 | fi | |
134 | AM_CONDITIONAL(ENABLE_LIBCTF, test "${enable_libctf}" = yes) | |
135 | ||
398ee8f1 | 136 | AM_BINUTILS_WARNINGS |
9cb80f72 | 137 | |
da594c4a | 138 | AC_CONFIG_HEADERS(config.h:config.in) |
252b5132 | 139 | |
df7b86aa NC |
140 | AH_VERBATIM([00_CONFIG_H_CHECK], |
141 | [/* Check that config.h is #included before system headers | |
142 | (this works only for glibc, but that should be enough). */ | |
e6f88107 | 143 | #if defined(__GLIBC__) && !defined(__FreeBSD_kernel__) && !defined(__CONFIG_H__) |
df7b86aa | 144 | # error config.h must be #included before system headers |
e6f88107 AM |
145 | #endif |
146 | #define __CONFIG_H__ 1]) | |
df7b86aa | 147 | |
252b5132 RH |
148 | if test -z "$target" ; then |
149 | AC_MSG_ERROR(Unrecognized target system type; please check config.sub.) | |
150 | fi | |
151 | if test -z "$host" ; then | |
152 | AC_MSG_ERROR(Unrecognized host system type; please check config.sub.) | |
153 | fi | |
154 | ||
252b5132 RH |
155 | AC_PROG_YACC |
156 | AM_PROG_LEX | |
157 | ||
e184813f | 158 | ALL_LINGUAS="bg ca da es fi fr hr id it ja pt ro ru rw sk sr sv tr uk vi zh_CN zh_TW" |
20e95c23 DJ |
159 | ZW_GNU_GETTEXT_SISTER_DIR |
160 | AM_PO_SUBDIRS | |
252b5132 RH |
161 | |
162 | AM_MAINTAINER_MODE | |
d5fbea21 | 163 | AM_CONDITIONAL(GENINSRC_NEVER, false) |
252b5132 | 164 | AC_EXEEXT |
2481e6a2 ILT |
165 | if test -n "$EXEEXT"; then |
166 | AC_DEFINE(HAVE_EXECUTABLE_SUFFIX, 1, | |
167 | [Does the platform use an executable suffix?]) | |
168 | fi | |
bb0cb4db ILT |
169 | AC_DEFINE_UNQUOTED(EXECUTABLE_SUFFIX, "${EXEEXT}", |
170 | [Suffix used for executables, if any.]) | |
252b5132 RH |
171 | |
172 | # host-specific stuff: | |
173 | ||
174 | HDEFINES= | |
175 | ||
176 | . ${srcdir}/../bfd/configure.host | |
177 | ||
178 | AC_SUBST(HDEFINES) | |
179 | AR=${AR-ar} | |
180 | AC_SUBST(AR) | |
181 | AC_PROG_RANLIB | |
182 | AC_PROG_INSTALL | |
183 | ||
184 | BFD_CC_FOR_BUILD | |
185 | ||
8a965946 ILT |
186 | DEMANGLER_NAME=c++filt |
187 | case "${host}" in | |
188 | *-*-go32* | *-*-msdos*) | |
189 | DEMANGLER_NAME=cxxfilt | |
190 | esac | |
191 | AC_SUBST(DEMANGLER_NAME) | |
192 | ||
87b9f255 AM |
193 | # We use headers from include/ that check various HAVE_*_H macros, thus |
194 | # should ensure they are set by configure. This is true even when C99 | |
195 | # guarantees they are available. | |
196 | # plugin-api.h tests HAVE_STDINT_H and HAVE_INTTYPES_H | |
197 | # Besides those, we need to check anything used in binutils/ not in C99. | |
13acb58d | 198 | AC_CHECK_HEADERS(fcntl.h inttypes.h stdint.h sys/file.h \ |
985e0264 | 199 | sys/stat.h sys/time.h sys/types.h unistd.h) |
252b5132 | 200 | AC_HEADER_SYS_WAIT |
303da223 | 201 | GCC_AC_FUNC_MMAP |
d7229d6a | 202 | AC_CHECK_FUNCS(fseeko fseeko64 getc_unlocked mkdtemp mkstemp utimensat utimes) |
985e0264 AM |
203 | |
204 | AC_MSG_CHECKING([for mbstate_t]) | |
205 | AC_TRY_COMPILE([#include <wchar.h>], | |
206 | [mbstate_t teststate;], | |
207 | have_mbstate_t=yes, have_mbstate_t=no) | |
208 | AC_MSG_RESULT($have_mbstate_t) | |
209 | if test x"$have_mbstate_t" = xyes; then | |
210 | AC_DEFINE(HAVE_MBSTATE_T,1,[Define if mbstate_t exists in wchar.h.]) | |
211 | fi | |
212 | ||
213 | # Copied from gnulib stat-time.m4. | |
214 | # We should just switch over to using gnulib. | |
215 | AC_CHECK_MEMBERS([struct stat.st_atim.tv_nsec], | |
216 | [AC_CACHE_CHECK([whether struct stat.st_atim is of type struct timespec], | |
217 | [ac_cv_typeof_struct_stat_st_atim_is_struct_timespec], | |
218 | [AC_COMPILE_IFELSE([AC_LANG_PROGRAM( | |
219 | [[ | |
220 | #include <sys/types.h> | |
221 | #include <sys/stat.h> | |
222 | #if HAVE_SYS_TIME_H | |
223 | # include <sys/time.h> | |
224 | #endif | |
225 | #include <time.h> | |
226 | struct timespec ts; | |
227 | struct stat st; | |
228 | ]], | |
229 | [[ | |
230 | st.st_atim = ts; | |
231 | ]])], | |
232 | [ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=yes], | |
233 | [ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=no])]) | |
234 | if test $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec = yes; then | |
235 | AC_DEFINE([TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC], [1], | |
236 | [Define to 1 if the type of the st_atim member of a struct stat is | |
237 | struct timespec.]) | |
238 | fi], | |
239 | [AC_CHECK_MEMBERS([struct stat.st_atimespec.tv_nsec], [], | |
240 | [AC_CHECK_MEMBERS([struct stat.st_atimensec], [], | |
241 | [AC_CHECK_MEMBERS([struct stat.st_atim.st__tim.tv_nsec], [], [], | |
242 | [#include <sys/types.h> | |
243 | #include <sys/stat.h>])], | |
244 | [#include <sys/types.h> | |
245 | #include <sys/stat.h>])], | |
246 | [#include <sys/types.h> | |
247 | #include <sys/stat.h>])], | |
248 | [#include <sys/types.h> | |
249 | #include <sys/stat.h>]) | |
cedd9a58 | 250 | |
f353eb8a | 251 | # Some systems have frexp only in -lm, not in -lc. |
07735828 | 252 | AC_SEARCH_LIBS(frexp, m) |
f353eb8a | 253 | |
44350750 NC |
254 | AM_LC_MESSAGES |
255 | ||
e46eba98 NC |
256 | AC_MSG_CHECKING(for a known getopt prototype in unistd.h) |
257 | AC_CACHE_VAL(bu_cv_decl_getopt_unistd_h, | |
da594c4a | 258 | [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <unistd.h>], [extern int getopt (int, char *const*, const char *);])], |
e46eba98 NC |
259 | bu_cv_decl_getopt_unistd_h=yes, bu_cv_decl_getopt_unistd_h=no)]) |
260 | AC_MSG_RESULT($bu_cv_decl_getopt_unistd_h) | |
261 | if test $bu_cv_decl_getopt_unistd_h = yes; then | |
262 | AC_DEFINE([HAVE_DECL_GETOPT], 1, | |
263 | [Is the prototype for getopt in <unistd.h> in the expected format?]) | |
264 | fi | |
265 | ||
252b5132 RH |
266 | # Under Next 3.2 <utime.h> apparently does not define struct utimbuf |
267 | # by default. | |
268 | AC_MSG_CHECKING([for utime.h]) | |
269 | AC_CACHE_VAL(bu_cv_header_utime_h, | |
da594c4a | 270 | [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <sys/types.h> |
252b5132 RH |
271 | #ifdef HAVE_TIME_H |
272 | #include <time.h> | |
273 | #endif | |
274 | #include <utime.h>], | |
da594c4a | 275 | [struct utimbuf s;])], |
252b5132 RH |
276 | bu_cv_header_utime_h=yes, bu_cv_header_utime_h=no)]) |
277 | AC_MSG_RESULT($bu_cv_header_utime_h) | |
278 | if test $bu_cv_header_utime_h = yes; then | |
279 | AC_DEFINE(HAVE_GOOD_UTIME_H, 1, [Does <utime.h> define struct utimbuf?]) | |
280 | fi | |
281 | ||
6577f365 | 282 | AC_CHECK_DECLS([asprintf, environ, getc_unlocked, stpcpy, strnlen]) |
252b5132 | 283 | |
2cac01e3 | 284 | # Link in zlib/zstd if we can. This allows us to read compressed debug |
ed2b5077 L |
285 | # sections. This is used only by readelf.c (objdump uses bfd for |
286 | # reading compressed sections). | |
287 | AM_ZLIB | |
2cac01e3 | 288 | AC_ZSTD |
1b315056 | 289 | |
252b5132 RH |
290 | BFD_BINARY_FOPEN |
291 | ||
2952f10c SM |
292 | # Support for the msgpack C library. |
293 | AC_ARG_WITH([msgpack], | |
c22e3e25 | 294 | AS_HELP_STRING([--with-msgpack], [Enable msgpack support (auto/yes/no)]), |
2952f10c SM |
295 | [], |
296 | [with_msgpack=auto]) | |
297 | ||
544c5619 AM |
298 | AS_IF([test "$with_msgpack" != no], |
299 | [PKG_CHECK_MODULES(MSGPACK, msgpack, | |
300 | [AC_DEFINE([HAVE_MSGPACK], [1], [Define to 1 if msgpack is available.])], | |
301 | [AS_IF([test "$with_msgpack" = yes], | |
302 | [AC_MSG_ERROR([--with-msgpack was given, but msgpack is missing or unusable.])])])]) | |
2952f10c | 303 | |
252b5132 RH |
304 | # target-specific stuff: |
305 | ||
306 | # Canonicalize the secondary target names. | |
307 | if test -n "$enable_targets"; then | |
308 | for targ in `echo $enable_targets | sed 's/,/ /g'` | |
309 | do | |
6d83c84b | 310 | result=`$ac_config_sub $targ 2>/dev/null` |
252b5132 RH |
311 | if test -n "$result"; then |
312 | canon_targets="$canon_targets $result" | |
313 | else | |
314 | # Allow targets that config.sub doesn't recognize, like "all". | |
315 | canon_targets="$canon_targets $targ" | |
316 | fi | |
317 | done | |
318 | fi | |
319 | ||
5ba684e2 NC |
320 | AC_CHECK_HEADER(iconv.h) |
321 | AM_ICONV | |
322 | ||
252b5132 RH |
323 | BUILD_SRCONV= |
324 | BUILD_DLLTOOL= | |
325 | DLLTOOL_DEFS= | |
7aad4c3d | 326 | DLLTOOL_DEFAULT= |
252b5132 | 327 | BUILD_WINDRES= |
692ed3e7 | 328 | BUILD_WINDMC= |
252b5132 RH |
329 | BUILD_DLLWRAP= |
330 | BUILD_MISC= | |
1d97d67f | 331 | BUILD_INSTALL_MISC= |
8b1e6df3 | 332 | OBJDUMP_DEFS= |
6abcee90 TG |
333 | OBJDUMP_PRIVATE_VECTORS= |
334 | OBJDUMP_PRIVATE_OFILES= | |
335 | od_vectors= | |
252b5132 RH |
336 | |
337 | for targ in $target $canon_targets | |
338 | do | |
b5c37946 SJ |
339 | case $targ in |
340 | all | *-*-hms*) | |
252b5132 | 341 | BUILD_SRCONV='$(SRCONV_PROG)' |
b5c37946 SJ |
342 | ;; |
343 | esac | |
344 | ||
345 | case $targ in | |
346 | all | spu-*-*) | |
347 | BUILD_MISC='bin2c$(EXEEXT_FOR_BUILD)' | |
348 | ;; | |
349 | esac | |
350 | ||
351 | case $targ in | |
352 | powerpc*-*-linux* | powerpc*-*-elf* | powerpc*-*-eabi*) | |
353 | BUILD_INSTALL_MISC=embedspu | |
354 | ;; | |
355 | esac | |
356 | ||
357 | case $targ in | |
358 | mep-*) | |
359 | OBJDUMP_DEFS="-DSKIP_ZEROES=256 -DSKIP_ZEROES_AT_END=0" | |
360 | ;; | |
361 | changequote(,)dnl | |
362 | powerpc*-aix5.[01]) | |
363 | ;; | |
364 | powerpc*-aix[5-9].*) | |
365 | changequote([,])dnl | |
366 | OBJDUMP_DEFS="-DAIX_WEAK_SUPPORT" | |
367 | ;; | |
368 | esac | |
369 | ||
370 | case $targ in | |
371 | aarch64-*-mingw*) | |
b7bf7f1b AM |
372 | BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)' |
373 | if test -z "$DLLTOOL_DEFAULT"; then | |
b5c37946 | 374 | DLLTOOL_DEFAULT="-DDLLTOOL_DEFAULT_AARCH64" |
b7bf7f1b | 375 | fi |
b5c37946 SJ |
376 | DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_AARCH64" |
377 | BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)' | |
378 | BUILD_WINDMC='$(WINDMC_PROG)$(EXEEXT)' | |
675b9d61 | 379 | BUILD_DLLWRAP='$(DLLWRAP_PROG)$(EXEEXT)' |
b5c37946 SJ |
380 | ;; |
381 | arm-wince-pe* | arm-*-wince | arm*-*-cegcc* | arm*-*-mingw32ce*) | |
382 | BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)' | |
383 | if test -z "$DLLTOOL_DEFAULT"; then | |
675b9d61 | 384 | DLLTOOL_DEFAULT="-DDLLTOOL_DEFAULT_ARM_WINCE" |
b5c37946 SJ |
385 | fi |
386 | DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_ARM_WINCE -DDLLTOOL_ARM" | |
387 | BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)' | |
388 | BUILD_WINDMC='$(WINDMC_PROG)$(EXEEXT)' | |
389 | ;; | |
390 | arm-*-pe*) | |
391 | BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)' | |
392 | if test -z "$DLLTOOL_DEFAULT"; then | |
7aad4c3d | 393 | DLLTOOL_DEFAULT="-DDLLTOOL_DEFAULT_ARM" |
b5c37946 SJ |
394 | fi |
395 | DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_ARM" | |
396 | BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)' | |
397 | BUILD_WINDMC='$(WINDMC_PROG)$(EXEEXT)' | |
398 | ;; | |
252b5132 | 399 | changequote(,)dnl |
b5c37946 | 400 | i[3-7]86-*-pe* | i[3-7]86-*-cygwin* | i[3-7]86-*-mingw32** | all) |
252b5132 | 401 | changequote([,])dnl |
b5c37946 SJ |
402 | BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)' |
403 | if test -z "$DLLTOOL_DEFAULT"; then | |
7aad4c3d | 404 | DLLTOOL_DEFAULT="-DDLLTOOL_DEFAULT_I386" |
b5c37946 SJ |
405 | fi |
406 | DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_I386" | |
407 | BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)' | |
408 | BUILD_WINDMC='$(WINDMC_PROG)$(EXEEXT)' | |
409 | BUILD_DLLWRAP='$(DLLWRAP_PROG)$(EXEEXT)' | |
410 | ;; | |
80c7c40a | 411 | changequote(,)dnl |
b5c37946 | 412 | i[3-7]86-*-interix) |
80c7c40a | 413 | changequote([,])dnl |
b5c37946 SJ |
414 | BUILD_DLLTOOL='$(DLLTOOL_PROG)' |
415 | if test -z "$DLLTOOL_DEFAULT"; then | |
7aad4c3d | 416 | DLLTOOL_DEFAULT="-DDLLTOOL_DEFAULT_I386" |
b5c37946 SJ |
417 | fi |
418 | DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_I386" | |
419 | ;; | |
420 | mcore-*-pe) | |
421 | BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)' | |
422 | if test -z "$DLLTOOL_DEFAULT"; then | |
7aad4c3d | 423 | DLLTOOL_DEFAULT="-DDLLTOOL_DEFAULT_MCORE" |
b5c37946 SJ |
424 | fi |
425 | DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_MCORE" | |
426 | BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)' | |
427 | BUILD_WINDMC='$(WINDMC_PROG)$(EXEEXT)' | |
428 | ;; | |
429 | mcore-*-elf) | |
430 | BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)' | |
431 | if test -z "$DLLTOOL_DEFAULT"; then | |
7aad4c3d | 432 | DLLTOOL_DEFAULT="-DDLLTOOL_DEFAULT_MCORE_ELF" |
b5c37946 SJ |
433 | fi |
434 | DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_MCORE_ELF" | |
435 | ;; | |
436 | sh*-*-pe) | |
437 | BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)' | |
438 | if test -z "$DLLTOOL_DEFAULT"; then | |
439 | DLLTOOL_DEFAULT="-DDLLTOOL_DEFAULT_SH" | |
440 | fi | |
441 | DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_SH" | |
442 | BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)' | |
443 | BUILD_WINDMC='$(WINDMC_PROG)$(EXEEXT)' | |
444 | ;; | |
445 | x86_64-*-mingw* | x86_64-*-cygwin*) | |
446 | BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)' | |
447 | if test -z "$DLLTOOL_DEFAULT"; then | |
448 | DLLTOOL_DEFAULT="-DDLLTOOL_DEFAULT_MX86_64" | |
449 | fi | |
450 | DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_MX86_64" | |
451 | BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)' | |
452 | BUILD_WINDMC='$(WINDMC_PROG)$(EXEEXT)' | |
453 | BUILD_DLLWRAP='$(DLLWRAP_PROG)$(EXEEXT)' | |
454 | ;; | |
455 | esac | |
6abcee90 | 456 | |
b5c37946 SJ |
457 | # Add objdump private vectors. |
458 | case $targ in | |
459 | all) | |
460 | od_vectors="objdump_private_desc_elf32_avr objdump_private_desc_xcoff\ | |
461 | objdump_private_desc_pe objdump_private_desc_mach_o" | |
462 | ;; | |
463 | avr-*-*) | |
464 | od_vectors="$od_vectors objdump_private_desc_elf32_avr" | |
465 | ;; | |
466 | powerpc*-*-aix* | rs6000-*-aix*) | |
467 | od_vectors="$od_vectors objdump_private_desc_xcoff" | |
468 | ;; | |
469 | *-*-pe* | *-*-cygwin* | *-*-mingw*) | |
470 | od_vectors="$od_vectors objdump_private_desc_pe" | |
471 | ;; | |
472 | *-*-darwin*) | |
473 | od_vectors="$od_vectors objdump_private_desc_mach_o" | |
474 | ;; | |
475 | esac | |
252b5132 RH |
476 | done |
477 | ||
6abcee90 TG |
478 | # Uniq objdump private vector, build objdump target ofiles. |
479 | od_files= | |
480 | f="" | |
481 | for i in $od_vectors ; do | |
482 | case " $f " in | |
483 | *" $i "*) ;; | |
484 | *) | |
485 | f="$f $i" | |
486 | OBJDUMP_PRIVATE_VECTORS="$OBJDUMP_PRIVATE_VECTORS &$i," | |
487 | case $i in | |
6d0cfb9c DC |
488 | objdump_private_desc_elf32_avr) |
489 | od_files="$od_files od-elf32_avr" ;; | |
6abcee90 TG |
490 | objdump_private_desc_xcoff) |
491 | od_files="$od_files od-xcoff" ;; | |
45b8517a NC |
492 | objdump_private_desc_pe) |
493 | od_files="$od_files od-pe" ;; | |
c5012cd8 TG |
494 | objdump_private_desc_mach_o) |
495 | od_files="$od_files od-macho" ;; | |
6abcee90 TG |
496 | *) AC_MSG_ERROR(*** unknown private vector $i) ;; |
497 | esac | |
498 | ;; | |
499 | esac | |
500 | done | |
501 | ||
502 | # Uniq objdump target ofiles | |
503 | f="" | |
504 | for i in $od_files ; do | |
505 | case " $f " in | |
506 | *" $i "*) ;; | |
507 | *) | |
508 | f="$f $i" | |
509 | OBJDUMP_PRIVATE_OFILES="$OBJDUMP_PRIVATE_OFILES $i.$objext" | |
510 | ;; | |
511 | esac | |
512 | done | |
513 | ||
7aad4c3d L |
514 | DLLTOOL_DEFS="$DLLTOOL_DEFS $DLLTOOL_DEFAULT" |
515 | ||
c918cb96 DD |
516 | if test "${with_windres+set}" = set; then |
517 | BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)' | |
518 | fi | |
519 | ||
692ed3e7 NC |
520 | if test "${with_windmc+set}" = set; then |
521 | BUILD_WINDMC='$(WINDMC_PROG)$(EXEEXT)' | |
522 | fi | |
523 | ||
6abcee90 TG |
524 | OBJDUMP_DEFS="${OBJDUMP_DEFS} -DOBJDUMP_PRIVATE_VECTORS=\"${OBJDUMP_PRIVATE_VECTORS}\"" |
525 | ||
252b5132 RH |
526 | AC_SUBST(BUILD_SRCONV) |
527 | AC_SUBST(BUILD_DLLTOOL) | |
528 | AC_SUBST(DLLTOOL_DEFS) | |
529 | AC_SUBST(BUILD_WINDRES) | |
692ed3e7 | 530 | AC_SUBST(BUILD_WINDMC) |
252b5132 RH |
531 | AC_SUBST(BUILD_DLLWRAP) |
532 | AC_SUBST(BUILD_MISC) | |
1d97d67f | 533 | AC_SUBST(BUILD_INSTALL_MISC) |
8b1e6df3 | 534 | AC_SUBST(OBJDUMP_DEFS) |
6abcee90 | 535 | AC_SUBST(OBJDUMP_PRIVATE_OFILES) |
252b5132 RH |
536 | |
537 | AC_DEFINE_UNQUOTED(TARGET, "${target}", [Configured target name.]) | |
538 | ||
539 | targ=$target | |
540 | . $srcdir/../bfd/config.bfd | |
541 | if test "x$targ_underscore" = "xyes"; then | |
542 | UNDERSCORE=1 | |
543 | else | |
544 | UNDERSCORE=0 | |
545 | fi | |
bb279dc0 ZW |
546 | AC_DEFINE_UNQUOTED(TARGET_PREPENDS_UNDERSCORE, $UNDERSCORE, |
547 | [Define to 1 if user symbol names have a leading underscore, 0 if not.]) | |
252b5132 | 548 | |
9cb80f72 | 549 | # Emulation |
52fbfb5d AM |
550 | targ=$target |
551 | . ${srcdir}/configure.tgt | |
552 | EMULATION=$targ_emul | |
9cb80f72 | 553 | EMULATION_VECTOR=$targ_emul_vector |
eb1e0e80 NC |
554 | |
555 | AC_SUBST(EMULATION) | |
556 | AC_SUBST(EMULATION_VECTOR) | |
557 | ||
108a6f8e CD |
558 | # Required for html and install-html |
559 | AC_SUBST(datarootdir) | |
560 | AC_SUBST(docdir) | |
561 | AC_SUBST(htmldir) | |
31dd3154 | 562 | AC_SUBST(pdfdir) |
108a6f8e | 563 | |
45c06bb7 | 564 | AC_CONFIG_FILES(Makefile po/Makefile.in:po/Make-in) |
da594c4a | 565 | AC_OUTPUT |
d546b610 L |
566 | |
567 | GNU_MAKE_JOBSERVER |