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