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