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