Commit | Line | Data |
---|---|---|
252b5132 RH |
1 | dnl Process this file with autoconf to produce a configure script. |
2 | dnl | |
da594c4a AM |
3 | AC_PREREQ(2.59) |
4 | AC_INIT | |
5 | AC_CONFIG_SRCDIR(ar.c) | |
252b5132 | 6 | |
da594c4a | 7 | AC_CANONICAL_TARGET |
5d64ca4e | 8 | AC_ISC_POSIX |
252b5132 | 9 | |
27b7e12d AM |
10 | changequote(,)dnl |
11 | BFD_VERSION=`sed -n -e 's/^.._INIT_AUTOMAKE.*,[ ]*\([^ ]*\)[ ]*).*/\1/p' < ${srcdir}/../bfd/configure.in` | |
12 | changequote([,])dnl | |
13 | AM_INIT_AUTOMAKE(binutils, ${BFD_VERSION}) | |
252b5132 | 14 | |
d45dc31f SE |
15 | AC_PROG_CC |
16 | AC_GNU_SOURCE | |
7357c5b6 | 17 | AC_USE_SYSTEM_EXTENSIONS |
e3525117 | 18 | |
ce3c775b NC |
19 | AC_ARG_ENABLE([plugins], |
20 | AS_HELP_STRING([--enable-plugins], [linker plugins (defaults no)]), | |
21 | [case "${enableval}" in | |
22 | yes | "") plugins=yes ;; | |
23 | no) plugins=no ;; | |
24 | *) plugins=yes ;; | |
25 | esac], | |
26 | [plugins=no]) | |
27 | ||
e3525117 NC |
28 | case "${target}" in |
29 | changequote(,)dnl | |
30 | sparc-*-solaris*|i[3-7]86-*-solaris*) | |
31 | changequote([,])dnl | |
32 | # See comment in bfd/configure.in for the reason for this test. | |
33 | # PR 9992/binutils: We have to duplicate the behaviour of bfd's | |
34 | # configure script so that the utilities in this directory agree | |
35 | # on the size of structures used to describe files. | |
36 | if test "${target}" = "${host}" -a "$enable_largefile" != 'yes'; then | |
ce3c775b NC |
37 | if test "$plugins" = "no"; then |
38 | enable_largefile="no" | |
39 | fi | |
e3525117 NC |
40 | fi |
41 | ;; | |
42 | esac | |
43 | ||
d053aef8 | 44 | AC_SYS_LARGEFILE |
da594c4a | 45 | LT_INIT |
252b5132 RH |
46 | |
47 | AC_ARG_ENABLE(targets, | |
48 | [ --enable-targets alternative target configurations], | |
49 | [case "${enableval}" in | |
da594c4a | 50 | yes | "") AC_MSG_ERROR(enable-targets option must specify target names or 'all') |
252b5132 RH |
51 | ;; |
52 | no) enable_targets= ;; | |
53 | *) enable_targets=$enableval ;; | |
54 | esac])dnl | |
252b5132 | 55 | |
398ee8f1 | 56 | AM_BINUTILS_WARNINGS |
9e9b66a9 | 57 | |
da594c4a | 58 | AC_CONFIG_HEADERS(config.h:config.in) |
252b5132 RH |
59 | |
60 | if test -z "$target" ; then | |
61 | AC_MSG_ERROR(Unrecognized target system type; please check config.sub.) | |
62 | fi | |
63 | if test -z "$host" ; then | |
64 | AC_MSG_ERROR(Unrecognized host system type; please check config.sub.) | |
65 | fi | |
66 | ||
252b5132 RH |
67 | AC_PROG_YACC |
68 | AM_PROG_LEX | |
69 | ||
ac5d747e | 70 | ALL_LINGUAS="da es fi fr id ja ro ru rw sk sv tr uk vi zh_CN zh_TW" |
20e95c23 DJ |
71 | ZW_GNU_GETTEXT_SISTER_DIR |
72 | AM_PO_SUBDIRS | |
252b5132 RH |
73 | |
74 | AM_MAINTAINER_MODE | |
d5fbea21 | 75 | AM_CONDITIONAL(GENINSRC_NEVER, false) |
252b5132 | 76 | AC_EXEEXT |
2481e6a2 ILT |
77 | if test -n "$EXEEXT"; then |
78 | AC_DEFINE(HAVE_EXECUTABLE_SUFFIX, 1, | |
79 | [Does the platform use an executable suffix?]) | |
80 | fi | |
bb0cb4db ILT |
81 | AC_DEFINE_UNQUOTED(EXECUTABLE_SUFFIX, "${EXEEXT}", |
82 | [Suffix used for executables, if any.]) | |
252b5132 RH |
83 | |
84 | # host-specific stuff: | |
85 | ||
86 | HDEFINES= | |
87 | ||
88 | . ${srcdir}/../bfd/configure.host | |
89 | ||
90 | AC_SUBST(HDEFINES) | |
91 | AR=${AR-ar} | |
92 | AC_SUBST(AR) | |
93 | AC_PROG_RANLIB | |
94 | AC_PROG_INSTALL | |
95 | ||
96 | BFD_CC_FOR_BUILD | |
97 | ||
8a965946 ILT |
98 | DEMANGLER_NAME=c++filt |
99 | case "${host}" in | |
100 | *-*-go32* | *-*-msdos*) | |
101 | DEMANGLER_NAME=cxxfilt | |
102 | esac | |
103 | AC_SUBST(DEMANGLER_NAME) | |
104 | ||
f8eae8b2 | 105 | AC_CHECK_HEADERS(string.h strings.h stdlib.h unistd.h fcntl.h sys/file.h limits.h sys/param.h) |
252b5132 RH |
106 | AC_HEADER_SYS_WAIT |
107 | AC_FUNC_ALLOCA | |
9710509e | 108 | AC_CHECK_FUNCS(sbrk utimes setmode getc_unlocked strcoll) |
f9c026a8 NC |
109 | AC_CHECK_FUNC([mkstemp], |
110 | AC_DEFINE([HAVE_MKSTEMP], 1, | |
111 | [Define to 1 if you have the `mkstemp' function.])) | |
112 | AC_CHECK_FUNC([mkdtemp], | |
113 | AC_DEFINE([HAVE_MKDTEMP], 1, | |
114 | [Define to 1 if you have the `mkdtemp' function.])) | |
cedd9a58 JJ |
115 | |
116 | # Check whether fopen64 is available and whether _LARGEFILE64_SOURCE | |
117 | # needs to be defined for it | |
118 | AC_MSG_CHECKING([for fopen64]) | |
119 | AC_CACHE_VAL(bu_cv_have_fopen64, | |
da594c4a | 120 | [AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <stdio.h>], [FILE *f = fopen64 ("/tmp/foo","r");])], |
cedd9a58 JJ |
121 | bu_cv_have_fopen64=yes, |
122 | [saved_CPPFLAGS=$CPPFLAGS | |
123 | CPPFLAGS="$CPPFLAGS -D_LARGEFILE64_SOURCE" | |
da594c4a AM |
124 | AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <stdio.h>], [FILE *f = fopen64 ("/tmp/foo","r");])], |
125 | bu_cv_have_fopen64="need -D_LARGEFILE64_SOURCE", | |
126 | bu_cv_have_fopen64=no) | |
cedd9a58 JJ |
127 | CPPFLAGS=$saved_CPPFLAGS])]) |
128 | AC_MSG_RESULT($bu_cv_have_fopen64) | |
6db7a086 | 129 | if test "$bu_cv_have_fopen64" != no; then |
cedd9a58 JJ |
130 | AC_DEFINE([HAVE_FOPEN64], 1, |
131 | [Is fopen64 available?]) | |
fb5b5478 JJ |
132 | fi |
133 | AC_MSG_CHECKING([for stat64]) | |
134 | AC_CACHE_VAL(bu_cv_have_stat64, | |
da594c4a | 135 | [AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <sys/stat.h>], [struct stat64 st; stat64 ("/tmp/foo", &st);])], |
fb5b5478 JJ |
136 | bu_cv_have_stat64=yes, |
137 | [saved_CPPFLAGS=$CPPFLAGS | |
138 | CPPFLAGS="$CPPFLAGS -D_LARGEFILE64_SOURCE" | |
da594c4a AM |
139 | AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <sys/stat.h>], [struct stat64 st; stat64 ("/tmp/foo", &st);])], |
140 | bu_cv_have_stat64="need -D_LARGEFILE64_SOURCE", | |
141 | bu_cv_have_stat64=no) | |
fb5b5478 JJ |
142 | CPPFLAGS=$saved_CPPFLAGS])]) |
143 | AC_MSG_RESULT($bu_cv_have_stat64) | |
144 | if test "$bu_cv_have_stat64" != no; then | |
145 | AC_DEFINE([HAVE_STAT64], 1, | |
146 | [Is stat64 available?]) | |
147 | fi | |
148 | if test "$bu_cv_have_fopen64" = "need -D_LARGEFILE64_SOURCE" \ | |
149 | || test "$bu_cv_have_stat64" = "need -D_LARGEFILE64_SOURCE"; then | |
150 | AC_DEFINE([_LARGEFILE64_SOURCE], 1, | |
151 | [Enable LFS]) | |
152 | CPPFLAGS="$CPPFLAGS -D_LARGEFILE64_SOURCE" | |
cedd9a58 | 153 | fi |
252b5132 | 154 | |
f353eb8a | 155 | # Some systems have frexp only in -lm, not in -lc. |
07735828 | 156 | AC_SEARCH_LIBS(frexp, m) |
f353eb8a | 157 | |
252b5132 RH |
158 | AC_MSG_CHECKING(for time_t in time.h) |
159 | AC_CACHE_VAL(bu_cv_decl_time_t_time_h, | |
da594c4a | 160 | [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <time.h>], [time_t i;])], |
252b5132 RH |
161 | bu_cv_decl_time_t_time_h=yes, bu_cv_decl_time_t_time_h=no)]) |
162 | AC_MSG_RESULT($bu_cv_decl_time_t_time_h) | |
163 | if test $bu_cv_decl_time_t_time_h = yes; then | |
164 | AC_DEFINE([HAVE_TIME_T_IN_TIME_H], 1, | |
165 | [Is the type time_t defined in <time.h>?]) | |
166 | fi | |
167 | ||
168 | AC_MSG_CHECKING(for time_t in sys/types.h) | |
169 | AC_CACHE_VAL(bu_cv_decl_time_t_types_h, | |
da594c4a | 170 | [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <sys/types.h>], [time_t i;])], |
252b5132 RH |
171 | bu_cv_decl_time_t_types_h=yes, bu_cv_decl_time_t_types_h=no)]) |
172 | AC_MSG_RESULT($bu_cv_decl_time_t_types_h) | |
173 | if test $bu_cv_decl_time_t_types_h = yes; then | |
174 | AC_DEFINE([HAVE_TIME_T_IN_TYPES_H], 1, | |
175 | [Is the type time_t defined in <sys/types.h>?]) | |
176 | fi | |
177 | ||
e46eba98 NC |
178 | AC_MSG_CHECKING(for a known getopt prototype in unistd.h) |
179 | AC_CACHE_VAL(bu_cv_decl_getopt_unistd_h, | |
da594c4a | 180 | [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <unistd.h>], [extern int getopt (int, char *const*, const char *);])], |
e46eba98 NC |
181 | bu_cv_decl_getopt_unistd_h=yes, bu_cv_decl_getopt_unistd_h=no)]) |
182 | AC_MSG_RESULT($bu_cv_decl_getopt_unistd_h) | |
183 | if test $bu_cv_decl_getopt_unistd_h = yes; then | |
184 | AC_DEFINE([HAVE_DECL_GETOPT], 1, | |
185 | [Is the prototype for getopt in <unistd.h> in the expected format?]) | |
186 | fi | |
187 | ||
252b5132 RH |
188 | # Under Next 3.2 <utime.h> apparently does not define struct utimbuf |
189 | # by default. | |
190 | AC_MSG_CHECKING([for utime.h]) | |
191 | AC_CACHE_VAL(bu_cv_header_utime_h, | |
da594c4a | 192 | [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <sys/types.h> |
252b5132 RH |
193 | #ifdef HAVE_TIME_H |
194 | #include <time.h> | |
195 | #endif | |
196 | #include <utime.h>], | |
da594c4a | 197 | [struct utimbuf s;])], |
252b5132 RH |
198 | bu_cv_header_utime_h=yes, bu_cv_header_utime_h=no)]) |
199 | AC_MSG_RESULT($bu_cv_header_utime_h) | |
200 | if test $bu_cv_header_utime_h = yes; then | |
201 | AC_DEFINE(HAVE_GOOD_UTIME_H, 1, [Does <utime.h> define struct utimbuf?]) | |
202 | fi | |
203 | ||
db50c840 EB |
204 | AC_CHECK_DECLS([fprintf, stpcpy, strstr, sbrk, getenv, environ, getc_unlocked, |
205 | snprintf, vsnprintf]) | |
252b5132 | 206 | |
1b315056 CS |
207 | # Link in zlib if we can. This allows us to read compressed debug |
208 | # sections. This is used only by readelf.c (objdump uses bfd for | |
209 | # reading compressed sections). | |
210 | AC_SEARCH_LIBS(zlibVersion, z, [AC_CHECK_HEADERS(zlib.h)]) | |
211 | ||
252b5132 RH |
212 | BFD_BINARY_FOPEN |
213 | ||
214 | # target-specific stuff: | |
215 | ||
216 | # Canonicalize the secondary target names. | |
217 | if test -n "$enable_targets"; then | |
218 | for targ in `echo $enable_targets | sed 's/,/ /g'` | |
219 | do | |
6d83c84b | 220 | result=`$ac_config_sub $targ 2>/dev/null` |
252b5132 RH |
221 | if test -n "$result"; then |
222 | canon_targets="$canon_targets $result" | |
223 | else | |
224 | # Allow targets that config.sub doesn't recognize, like "all". | |
225 | canon_targets="$canon_targets $targ" | |
226 | fi | |
227 | done | |
228 | fi | |
229 | ||
5ba684e2 NC |
230 | AC_CHECK_HEADER(iconv.h) |
231 | AM_ICONV | |
232 | ||
252b5132 RH |
233 | all_targets=false |
234 | BUILD_NLMCONV= | |
235 | NLMCONV_DEFS= | |
236 | BUILD_SRCONV= | |
237 | BUILD_DLLTOOL= | |
238 | DLLTOOL_DEFS= | |
7aad4c3d | 239 | DLLTOOL_DEFAULT= |
252b5132 | 240 | BUILD_WINDRES= |
692ed3e7 | 241 | BUILD_WINDMC= |
252b5132 RH |
242 | BUILD_DLLWRAP= |
243 | BUILD_MISC= | |
1d97d67f | 244 | BUILD_INSTALL_MISC= |
8b1e6df3 | 245 | OBJDUMP_DEFS= |
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)' | |
252b5132 RH |
263 | else |
264 | case $targ in | |
265 | changequote(,)dnl | |
80c7c40a | 266 | i[3-7]86*-*-netware*) |
252b5132 RH |
267 | changequote([,])dnl |
268 | BUILD_NLMCONV='$(NLMCONV_PROG)$(EXEEXT)' | |
269 | NLMCONV_DEFS="$NLMCONV_DEFS -DNLMCONV_I386" | |
270 | ;; | |
271 | alpha*-*-netware*) | |
272 | BUILD_NLMCONV='$(NLMCONV_PROG)$(EXEEXT)' | |
273 | NLMCONV_DEFS="$NLMCONV_DEFS -DNLMCONV_ALPHA" | |
274 | ;; | |
275 | powerpc*-*-netware*) | |
276 | BUILD_NLMCONV='$(NLMCONV_PROG)$(EXEEXT)' | |
277 | NLMCONV_DEFS="$NLMCONV_DEFS -DNLMCONV_POWERPC" | |
278 | ;; | |
279 | sparc*-*-netware*) | |
280 | BUILD_NLMCONV='$(NLMCONV_PROG)$(EXEEXT)' | |
281 | NLMCONV_DEFS="$NLMCONV_DEFS -DNLMCONV_SPARC" | |
282 | ;; | |
283 | esac | |
284 | case $targ in | |
285 | *-*-hms*) BUILD_SRCONV='$(SRCONV_PROG)' ;; | |
286 | esac | |
287 | case $targ in | |
a8c548cb NC |
288 | arm-epoc-pe*) |
289 | BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)' | |
7aad4c3d L |
290 | if test -z "$DLLTOOL_DEFAULT"; then |
291 | DLLTOOL_DEFAULT="-DDLLTOOL_DEFAULT_ARM_EPOC" | |
292 | fi | |
a8c548cb NC |
293 | DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_ARM_EPOC -DDLLTOOL_ARM" |
294 | BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)' | |
692ed3e7 | 295 | BUILD_WINDMC='$(WINDMC_PROG)$(EXEEXT)' |
a8c548cb | 296 | ;; |
7148cc28 NC |
297 | arm-wince-pe* | arm-*-wince) |
298 | BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)' | |
7aad4c3d L |
299 | if test -z "$DLLTOOL_DEFAULT"; then |
300 | DLLTOOL_DEFAULT="-DDLLTOOL_DEFAULT_ARM_WINCE" | |
301 | fi | |
7148cc28 NC |
302 | DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_ARM_WINCE -DDLLTOOL_ARM" |
303 | BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)' | |
692ed3e7 | 304 | BUILD_WINDMC='$(WINDMC_PROG)$(EXEEXT)' |
7148cc28 NC |
305 | ;; |
306 | arm-*-pe*) | |
252b5132 | 307 | BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)' |
7aad4c3d L |
308 | if test -z "$DLLTOOL_DEFAULT"; then |
309 | DLLTOOL_DEFAULT="-DDLLTOOL_DEFAULT_ARM" | |
310 | fi | |
252b5132 RH |
311 | DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_ARM" |
312 | BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)' | |
692ed3e7 | 313 | BUILD_WINDMC='$(WINDMC_PROG)$(EXEEXT)' |
7a7b06ef | 314 | ;; |
27a710e5 | 315 | thumb-*-pe*) |
252b5132 | 316 | BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)' |
7aad4c3d L |
317 | if test -z "$DLLTOOL_DEFAULT"; then |
318 | DLLTOOL_DEFAULT="-DDLLTOOL_DEFAULT_ARM" | |
319 | fi | |
252b5132 RH |
320 | DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_ARM" |
321 | BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)' | |
692ed3e7 | 322 | BUILD_WINDMC='$(WINDMC_PROG)$(EXEEXT)' |
7a7b06ef | 323 | ;; |
42037fe5 | 324 | x86_64-*-mingw*) |
99ad8390 | 325 | BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)' |
7aad4c3d L |
326 | if test -z "$DLLTOOL_DEFAULT"; then |
327 | DLLTOOL_DEFAULT="-DDLLTOOL_DEFAULT_MX86_64" | |
328 | fi | |
99ad8390 NC |
329 | DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_MX86_64" |
330 | BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)' | |
692ed3e7 | 331 | BUILD_WINDMC='$(WINDMC_PROG)$(EXEEXT)' |
99ad8390 NC |
332 | BUILD_DLLWRAP='$(DLLWRAP_PROG)$(EXEEXT)' |
333 | ;; | |
252b5132 | 334 | changequote(,)dnl |
80c7c40a | 335 | i[3-7]86-*-pe* | i[3-7]86-*-cygwin* | i[3-7]86-*-mingw32** | i[3-7]86-*-netbsdpe*) |
252b5132 RH |
336 | changequote([,])dnl |
337 | BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)' | |
7aad4c3d L |
338 | if test -z "$DLLTOOL_DEFAULT"; then |
339 | DLLTOOL_DEFAULT="-DDLLTOOL_DEFAULT_I386" | |
340 | fi | |
252b5132 RH |
341 | DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_I386" |
342 | BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)' | |
692ed3e7 | 343 | BUILD_WINDMC='$(WINDMC_PROG)$(EXEEXT)' |
252b5132 | 344 | BUILD_DLLWRAP='$(DLLWRAP_PROG)$(EXEEXT)' |
7a7b06ef | 345 | ;; |
80c7c40a NC |
346 | changequote(,)dnl |
347 | i[3-7]86-*-interix) | |
348 | changequote([,])dnl | |
7a7b06ef | 349 | BUILD_DLLTOOL='$(DLLTOOL_PROG)' |
7aad4c3d L |
350 | if test -z "$DLLTOOL_DEFAULT"; then |
351 | DLLTOOL_DEFAULT="-DDLLTOOL_DEFAULT_I386" | |
352 | fi | |
7a7b06ef ILT |
353 | DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_I386" |
354 | ;; | |
f0660b73 NC |
355 | changequote(,)dnl |
356 | powerpc*-aix5.[01]) | |
357 | changequote([,])dnl | |
358 | ;; | |
e5231592 RS |
359 | changequote(,)dnl |
360 | powerpc*-aix[5-9].*) | |
361 | changequote([,])dnl | |
f0660b73 NC |
362 | OBJDUMP_DEFS="-DAIX_WEAK_SUPPORT" |
363 | ;; | |
e1d5b1e7 | 364 | powerpc*-*-pe* | powerpc*-*-cygwin*) |
252b5132 | 365 | BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)' |
7aad4c3d L |
366 | if test -z "$DLLTOOL_DEFAULT"; then |
367 | DLLTOOL_DEFAULT="-DDLLTOOL_DEFAULT_PPC" | |
368 | fi | |
252b5132 RH |
369 | DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_PPC" |
370 | BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)' | |
692ed3e7 | 371 | BUILD_WINDMC='$(WINDMC_PROG)$(EXEEXT)' |
7a7b06ef | 372 | ;; |
59678365 | 373 | powerpc*-*-linux* | powerpc*-*-elf* | powerpc*-*-eabi*) |
1d97d67f | 374 | BUILD_INSTALL_MISC="${BUILD_INSTALL_MISC} embedspu" |
669a9a2a | 375 | ;; |
e1d5b1e7 | 376 | sh*-*-pe) |
8a0e0f38 | 377 | BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)' |
7aad4c3d L |
378 | if test -z "$DLLTOOL_DEFAULT"; then |
379 | DLLTOOL_DEFAULT="-DDLLTOOL_DEFAULT_SH" | |
380 | fi | |
8a0e0f38 NC |
381 | DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_SH" |
382 | BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)' | |
692ed3e7 | 383 | BUILD_WINDMC='$(WINDMC_PROG)$(EXEEXT)' |
8a0e0f38 | 384 | ;; |
cd14b966 | 385 | spu-*-*) |
1d97d67f | 386 | BUILD_MISC="${BUILD_MISC} "'bin2c$(EXEEXT_FOR_BUILD)' |
cd14b966 | 387 | ;; |
e1d5b1e7 | 388 | mips*-*-pe) |
8a0e0f38 | 389 | BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)' |
7aad4c3d L |
390 | if test -z "$DLLTOOL_DEFAULT"; then |
391 | DLLTOOL_DEFAULT="-DDLLTOOL_DEFAULT_MIPS" | |
392 | fi | |
8a0e0f38 NC |
393 | DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_MIPS" |
394 | BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)' | |
692ed3e7 | 395 | BUILD_WINDMC='$(WINDMC_PROG)$(EXEEXT)' |
8a0e0f38 | 396 | ;; |
27a710e5 | 397 | mcore-*-pe) |
661016bb | 398 | BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)' |
7aad4c3d L |
399 | if test -z "$DLLTOOL_DEFAULT"; then |
400 | DLLTOOL_DEFAULT="-DDLLTOOL_DEFAULT_MCORE" | |
401 | fi | |
661016bb NC |
402 | DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_MCORE" |
403 | BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)' | |
692ed3e7 | 404 | BUILD_WINDMC='$(WINDMC_PROG)$(EXEEXT)' |
7a7b06ef | 405 | ;; |
27a710e5 | 406 | mcore-*-elf) |
661016bb | 407 | BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)' |
7aad4c3d L |
408 | if test -z "$DLLTOOL_DEFAULT"; then |
409 | DLLTOOL_DEFAULT="-DDLLTOOL_DEFAULT_MCORE_ELF" | |
410 | fi | |
661016bb | 411 | DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_MCORE_ELF" |
7a7b06ef | 412 | ;; |
15ab5209 DB |
413 | mep-*) |
414 | OBJDUMP_DEFS="-DSKIP_ZEROES=256 -DSKIP_ZEROES_AT_END=0" | |
415 | ;; | |
252b5132 RH |
416 | esac |
417 | fi | |
418 | done | |
419 | ||
7aad4c3d L |
420 | DLLTOOL_DEFS="$DLLTOOL_DEFS $DLLTOOL_DEFAULT" |
421 | ||
c918cb96 DD |
422 | if test "${with_windres+set}" = set; then |
423 | BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)' | |
424 | fi | |
425 | ||
692ed3e7 NC |
426 | if test "${with_windmc+set}" = set; then |
427 | BUILD_WINDMC='$(WINDMC_PROG)$(EXEEXT)' | |
428 | fi | |
429 | ||
252b5132 RH |
430 | AC_SUBST(NLMCONV_DEFS) |
431 | AC_SUBST(BUILD_NLMCONV) | |
432 | AC_SUBST(BUILD_SRCONV) | |
433 | AC_SUBST(BUILD_DLLTOOL) | |
434 | AC_SUBST(DLLTOOL_DEFS) | |
435 | AC_SUBST(BUILD_WINDRES) | |
692ed3e7 | 436 | AC_SUBST(BUILD_WINDMC) |
252b5132 RH |
437 | AC_SUBST(BUILD_DLLWRAP) |
438 | AC_SUBST(BUILD_MISC) | |
1d97d67f | 439 | AC_SUBST(BUILD_INSTALL_MISC) |
8b1e6df3 | 440 | AC_SUBST(OBJDUMP_DEFS) |
252b5132 RH |
441 | |
442 | AC_DEFINE_UNQUOTED(TARGET, "${target}", [Configured target name.]) | |
443 | ||
444 | targ=$target | |
445 | . $srcdir/../bfd/config.bfd | |
446 | if test "x$targ_underscore" = "xyes"; then | |
447 | UNDERSCORE=1 | |
448 | else | |
449 | UNDERSCORE=0 | |
450 | fi | |
bb279dc0 ZW |
451 | AC_DEFINE_UNQUOTED(TARGET_PREPENDS_UNDERSCORE, $UNDERSCORE, |
452 | [Define to 1 if user symbol names have a leading underscore, 0 if not.]) | |
252b5132 | 453 | |
eb1e0e80 NC |
454 | # Emulation |
455 | for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'` | |
456 | do | |
457 | # Canonicalize the secondary target names. | |
458 | result=`$ac_config_sub $targ_alias 2>/dev/null` | |
459 | if test -n "$result"; then | |
460 | targ=$result | |
461 | else | |
462 | targ=$targ_alias | |
463 | fi | |
464 | ||
465 | . ${srcdir}/configure.tgt | |
466 | ||
467 | EMULATION=$targ_emul | |
468 | EMULATION_VECTOR=$targ_emul_vector | |
469 | done | |
470 | ||
471 | AC_SUBST(EMULATION) | |
472 | AC_SUBST(EMULATION_VECTOR) | |
473 | ||
108a6f8e CD |
474 | # Required for html and install-html |
475 | AC_SUBST(datarootdir) | |
476 | AC_SUBST(docdir) | |
477 | AC_SUBST(htmldir) | |
31dd3154 | 478 | AC_SUBST(pdfdir) |
108a6f8e | 479 | |
da594c4a AM |
480 | AC_CONFIG_FILES(Makefile doc/Makefile po/Makefile.in:po/Make-in) |
481 | AC_OUTPUT |