Commit | Line | Data |
---|---|---|
252b5132 RH |
1 | dnl Process this file with autoconf to produce a configure script |
2 | dnl | |
250d07de | 3 | dnl Copyright (C) 2012-2021 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. | |
995da1ff | 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. | |
995da1ff | 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 AM |
20 | m4_include([../bfd/version.m4]) |
21 | AC_INIT([ld], BFD_VERSION) | |
da594c4a | 22 | AC_CONFIG_SRCDIR(ldmain.c) |
252b5132 | 23 | |
da594c4a | 24 | AC_CANONICAL_TARGET |
02ecc8e9 | 25 | AC_CANONICAL_BUILD |
252b5132 | 26 | |
2e98a7bd | 27 | AM_INIT_AUTOMAKE |
64ac50ac | 28 | AM_MAINTAINER_MODE |
252b5132 | 29 | |
b879806f AM |
30 | AC_PROG_CC |
31 | AC_PROG_CXX | |
68880f31 | 32 | AC_PROG_GREP |
b879806f AM |
33 | AC_GNU_SOURCE |
34 | AC_USE_SYSTEM_EXTENSIONS | |
35 | AC_PROG_INSTALL | |
36 | ||
37 | LT_INIT | |
38 | ACX_LARGEFILE | |
39 | ||
43e05cd4 AM |
40 | ac_checking= |
41 | . ${srcdir}/../bfd/development.sh | |
42 | test "$development" = true && ac_checking=yes | |
43 | AC_ARG_ENABLE(checking, | |
44 | [ --enable-checking enable run-time checks], | |
45 | [case "${enableval}" in | |
46 | no|none) ac_checking= ;; | |
47 | *) ac_checking=yes ;; | |
48 | esac])dnl | |
49 | if test x$ac_checking != x ; then | |
50 | AC_DEFINE(ENABLE_CHECKING, 1, [Define if you want run-time sanity checks.]) | |
51 | fi | |
52 | ||
8e523c23 | 53 | AC_ARG_WITH(lib-path, [ --with-lib-path=dir1:dir2... set default LIB_PATH],LIB_PATH=$withval) |
252b5132 RH |
54 | AC_ARG_ENABLE(targets, |
55 | [ --enable-targets alternative target configurations], | |
56 | [case "${enableval}" in | |
da594c4a | 57 | yes | "") AC_MSG_ERROR(enable-targets option must specify target names or 'all') |
6c19b93b | 58 | ;; |
252b5132 RH |
59 | no) enable_targets= ;; |
60 | *) enable_targets=$enableval ;; | |
61 | esac])dnl | |
62 | AC_ARG_ENABLE(64-bit-bfd, | |
63 | [ --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes)], | |
64 | [case "${enableval}" in | |
65 | yes) want64=true ;; | |
66 | no) want64=false ;; | |
67 | *) AC_MSG_ERROR(bad value ${enableval} for 64-bit-bfd option) ;; | |
68 | esac],[want64=false])dnl | |
69 | ||
9c8ebd6a DJ |
70 | AC_ARG_WITH(sysroot, |
71 | [ --with-sysroot[=DIR] Search for usr/lib et al within DIR.], | |
72 | [ | |
73 | case ${with_sysroot} in | |
715d1656 | 74 | yes) TARGET_SYSTEM_ROOT='${exec_prefix}/${target_alias}/sys-root' ;; |
9c8ebd6a DJ |
75 | *) TARGET_SYSTEM_ROOT=$with_sysroot ;; |
76 | esac | |
77 | ||
78 | TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"$(TARGET_SYSTEM_ROOT)\"' | |
79 | use_sysroot=yes | |
80 | ||
fa1e8d8e RS |
81 | if test "x$prefix" = xNONE; then |
82 | test_prefix=/usr/local | |
83 | else | |
84 | test_prefix=$prefix | |
85 | fi | |
9c8ebd6a | 86 | if test "x$exec_prefix" = xNONE; then |
fa1e8d8e | 87 | test_exec_prefix=$test_prefix |
9c8ebd6a | 88 | else |
fa1e8d8e | 89 | test_exec_prefix=$exec_prefix |
9c8ebd6a DJ |
90 | fi |
91 | case ${TARGET_SYSTEM_ROOT} in | |
715d1656 | 92 | "${test_prefix}"|"${test_prefix}/"*|\ |
fa1e8d8e RS |
93 | "${test_exec_prefix}"|"${test_exec_prefix}/"*|\ |
94 | '${prefix}'|'${prefix}/'*|\ | |
715d1656 | 95 | '${exec_prefix}'|'${exec_prefix}/'*) |
9c8ebd6a DJ |
96 | t="$TARGET_SYSTEM_ROOT_DEFINE -DTARGET_SYSTEM_ROOT_RELOCATABLE" |
97 | TARGET_SYSTEM_ROOT_DEFINE="$t" | |
98 | ;; | |
99 | esac | |
100 | ], [ | |
101 | use_sysroot=no | |
102 | TARGET_SYSTEM_ROOT= | |
103 | TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"\"' | |
104 | ]) | |
105 | AC_SUBST(use_sysroot) | |
106 | AC_SUBST(TARGET_SYSTEM_ROOT) | |
107 | AC_SUBST(TARGET_SYSTEM_ROOT_DEFINE) | |
108 | ||
4fda8867 NC |
109 | dnl Use --enable-gold to decide if this linker should be the default. |
110 | dnl "install_as_default" is set to false if gold is the default linker. | |
111 | dnl "installed_linker" is the installed BFD linker name. | |
112 | AC_ARG_ENABLE(gold, | |
c7791212 | 113 | [[ --enable-gold[=ARG] build gold [ARG={default,yes,no}]]], |
bf9ef603 | 114 | [case "${enableval}" in |
c7791212 | 115 | default) |
4fda8867 NC |
116 | install_as_default=no |
117 | installed_linker=ld.bfd | |
118 | ;; | |
c7791212 | 119 | yes|no) |
4fda8867 NC |
120 | install_as_default=yes |
121 | installed_linker=ld.bfd | |
122 | ;; | |
123 | *) | |
124 | AC_MSG_ERROR([invalid --enable-gold argument]) | |
125 | ;; | |
126 | esac], | |
c7791212 NC |
127 | [install_as_default=yes |
128 | installed_linker=ld.bfd]) | |
4fda8867 NC |
129 | AC_SUBST(install_as_default) |
130 | AC_SUBST(installed_linker) | |
131 | ||
7fb9f789 NC |
132 | AC_ARG_ENABLE([got], |
133 | AS_HELP_STRING([--enable-got=<type>], | |
6c19b93b | 134 | [GOT handling scheme (target, single, negative, multigot)]), |
7fb9f789 NC |
135 | [case "${enableval}" in |
136 | target | single | negative | multigot) got_handling=$enableval ;; | |
da594c4a | 137 | *) AC_MSG_ERROR(bad value ${enableval} for --enable-got option) ;; |
7fb9f789 NC |
138 | esac], |
139 | [got_handling=target]) | |
140 | ||
141 | case "${got_handling}" in | |
142 | target) | |
143 | AC_DEFINE([GOT_HANDLING_DEFAULT], [GOT_HANDLING_TARGET_DEFAULT], | |
6c19b93b | 144 | [Define to choose default GOT handling scheme]) ;; |
7fb9f789 NC |
145 | single) |
146 | AC_DEFINE([GOT_HANDLING_DEFAULT], [GOT_HANDLING_SINGLE], | |
6c19b93b | 147 | [Define to choose default GOT handling scheme]) ;; |
7fb9f789 NC |
148 | negative) |
149 | AC_DEFINE([GOT_HANDLING_DEFAULT], [GOT_HANDLING_NEGATIVE], | |
6c19b93b | 150 | [Define to choose default GOT handling scheme]) ;; |
7fb9f789 NC |
151 | multigot) |
152 | AC_DEFINE([GOT_HANDLING_DEFAULT], [GOT_HANDLING_MULTIGOT], | |
6c19b93b | 153 | [Define to choose default GOT handling scheme]) ;; |
da594c4a | 154 | *) AC_MSG_ERROR(bad value ${got_handling} for --enable-got option) ;; |
7fb9f789 NC |
155 | esac |
156 | ||
6c3bc0f8 NC |
157 | # PR gas/19109 |
158 | # Decide the default method for compressing debug sections. | |
159 | ac_default_compressed_debug_sections=unset | |
160 | # Provide a configure time option to override our default. | |
161 | AC_ARG_ENABLE(compressed_debug_sections, | |
4894d80b L |
162 | AS_HELP_STRING([--enable-compressed-debug-sections={all,ld,none}], |
163 | [compress debug sections by default])], | |
164 | [case ,"${enableval}", in | |
9b4c123c | 165 | ,yes, | ,all, | *,ld,*) ac_default_compressed_debug_sections=yes ;; |
4894d80b | 166 | ,no, | ,none,) ac_default_compressed_debug_sections=no ;; |
6c3bc0f8 NC |
167 | esac])dnl |
168 | ||
6734f10a SB |
169 | # Decide setting DT_RUNPATH instead of DT_RPATH by default |
170 | ac_default_new_dtags=unset | |
171 | # Provide a configure time option to override our default. | |
172 | AC_ARG_ENABLE(new_dtags, | |
173 | AS_HELP_STRING([--enable-new-dtags], | |
174 | [set DT_RUNPATH instead of DT_RPATH by default])], | |
175 | [case "${enableval}" in | |
176 | yes) ac_default_new_dtags=1 ;; | |
177 | no) ac_default_new_dtags=0 ;; | |
178 | esac])dnl | |
179 | ||
647e4d46 L |
180 | # Decide if -z relro should be enabled in ELF linker by default. |
181 | ac_default_ld_z_relro=unset | |
182 | # Provide a configure time option to override our default. | |
183 | AC_ARG_ENABLE(relro, | |
184 | AS_HELP_STRING([--enable-relro], | |
185 | [enable -z relro in ELF linker by default]), | |
186 | [case "${enableval}" in | |
187 | yes) ac_default_ld_z_relro=1 ;; | |
188 | no) ac_default_ld_z_relro=0 ;; | |
189 | esac])dnl | |
190 | ||
b32632c4 L |
191 | # Decide if DT_TEXTREL check should be enabled in ELF linker. |
192 | ac_default_ld_textrel_check=unset | |
193 | AC_ARG_ENABLE([textrel-check], | |
194 | AC_HELP_STRING([--enable-textrel-check=@<:@yes|no|warning|error@:>@], | |
195 | [enable DT_TEXTREL check in ELF linker]), | |
196 | [case "${enableval}" in | |
197 | yes|no|warning|error) ac_default_ld_textrel_check=${enableval} ;; | |
198 | esac]) | |
199 | ||
f6aec96d L |
200 | # Decide if -z separate-code should be enabled in ELF linker by default. |
201 | ac_default_ld_z_separate_code=unset | |
202 | AC_ARG_ENABLE(separate-code, | |
203 | AS_HELP_STRING([--enable-separate-code], | |
204 | [enable -z separate-code in ELF linker by default]), | |
205 | [case "${enableval}" in | |
206 | yes) ac_default_ld_z_separate_code=1 ;; | |
207 | no) ac_default_ld_z_separate_code=0 ;; | |
208 | esac]) | |
209 | ||
23ae20f5 NC |
210 | # Decide if --error-handling-script should be supported. |
211 | ac_support_error_handling_script=unset | |
212 | AC_ARG_ENABLE(error-handling-script, | |
213 | AS_HELP_STRING([--enable-error-handling-script], | |
214 | [enable/disable support for the --error-handling-script option]), | |
215 | [case "${enableval}" in | |
216 | yes) ac_support_error_handling_script=1 ;; | |
217 | no) ac_support_error_handling_script=0 ;; | |
218 | esac]) | |
219 | ||
2760f24c RG |
220 | # Decide which "--hash-style" to use by default |
221 | # Provide a configure time option to override our default. | |
222 | AC_ARG_ENABLE([default-hash-style], | |
223 | AS_HELP_STRING([--enable-default-hash-style={sysv,gnu,both}], | |
224 | [use this default hash style]), | |
225 | [case "${enable_default_hash_style}" in | |
226 | sysv | gnu | both) ;; | |
227 | *) AC_MSG_ERROR([bad value ${enable_default_hash_style} for enable-default-hash-style option]) ;; | |
228 | esac], | |
229 | [case "${target}" in | |
230 | # Enable gnu hash only on GNU targets, but not mips | |
231 | mips*-*-*) enable_default_hash_style=sysv ;; | |
232 | *-*-gnu* | *-*-linux* | *-*-nacl*) enable_default_hash_style=both ;; | |
233 | *) enable_default_hash_style=sysv ;; | |
234 | esac]) | |
235 | ||
236 | case "${enable_default_hash_style}" in | |
237 | sysv | both) ac_default_emit_sysv_hash=1 ;; | |
238 | *) ac_default_emit_sysv_hash=0 ;; | |
239 | esac | |
240 | ||
241 | case "${enable_default_hash_style}" in | |
242 | gnu | both) ac_default_emit_gnu_hash=1 ;; | |
243 | *) ac_default_emit_gnu_hash=0 ;; | |
244 | esac | |
245 | ||
c774eab1 AM |
246 | AC_ARG_ENABLE(initfini-array, |
247 | [ --disable-initfini-array do not use .init_array/.fini_array sections], | |
248 | [case "${enableval}" in | |
249 | yes|no) ;; | |
250 | *) AC_MSG_ERROR([invalid --enable-initfini-array argument]) ;; | |
251 | esac], [enable_initfini_array=yes]) | |
252 | AC_SUBST(enable_initfini_array) | |
253 | if test $enable_initfini_array = yes; then | |
254 | AC_DEFINE(HAVE_INITFINI_ARRAY, 1, | |
255 | [Define .init_array/.fini_array sections are available and working.]) | |
256 | fi | |
257 | ||
094e34f2 NA |
258 | GCC_ENABLE([libctf], [yes], [], [Handle .ctf type-info sections]) |
259 | if test "${enable_libctf}" = yes; then | |
260 | AC_DEFINE(ENABLE_LIBCTF, 1, [Handle .ctf type-info sections]) | |
261 | fi | |
262 | AM_CONDITIONAL(ENABLE_LIBCTF, test "${enable_libctf}" = yes) | |
7cdfc346 | 263 | AC_SUBST(enable_libctf) |
094e34f2 | 264 | |
502bdb00 | 265 | AM_BINUTILS_WARNINGS |
a2d91340 | 266 | |
44350750 NC |
267 | AM_LC_MESSAGES |
268 | ||
da594c4a | 269 | AC_CONFIG_HEADERS([config.h:config.in]) |
252b5132 | 270 | |
df7b86aa NC |
271 | # PR 14072 |
272 | AH_VERBATIM([00_CONFIG_H_CHECK], | |
273 | [/* Check that config.h is #included before system headers | |
274 | (this works only for glibc, but that should be enough). */ | |
d17dce55 | 275 | #if defined(__GLIBC__) && !defined(__FreeBSD_kernel__) && !defined(__CONFIG_H__) |
df7b86aa NC |
276 | # error config.h must be #included before system headers |
277 | #endif | |
278 | #define __CONFIG_H__ 1]) | |
279 | ||
252b5132 RH |
280 | if test -z "$target" ; then |
281 | AC_MSG_ERROR(Unrecognized target system type; please check config.sub.) | |
282 | fi | |
283 | if test -z "$host" ; then | |
284 | AC_MSG_ERROR(Unrecognized host system type; please check config.sub.) | |
285 | fi | |
286 | ||
287 | # host-specific stuff: | |
288 | ||
e184813f | 289 | ALL_LINGUAS="bg da de es fi fr ga id it ja pt_BR ru sr sv tr uk vi zh_CN zh_TW" |
20e95c23 DJ |
290 | ZW_GNU_GETTEXT_SISTER_DIR |
291 | AM_PO_SUBDIRS | |
252b5132 RH |
292 | |
293 | AC_EXEEXT | |
294 | ||
295 | AC_PROG_YACC | |
296 | AM_PROG_LEX | |
297 | ||
298 | AM_MAINTAINER_MODE | |
d5fbea21 | 299 | AM_CONDITIONAL(GENINSRC_NEVER, false) |
eccbf555 | 300 | ACX_PROG_CMP_IGNORE_INITIAL |
252b5132 RH |
301 | |
302 | . ${srcdir}/configure.host | |
303 | ||
304 | AC_SUBST(HDEFINES) | |
252b5132 RH |
305 | AC_SUBST(NATIVE_LIB_DIRS) |
306 | ||
c774eab1 AM |
307 | # We use headers from include/ that check various HAVE_*_H macros, thus |
308 | # should ensure they are set by configure. This is true even when C99 | |
309 | # guarantees they are available. | |
310 | # sha1.h and md4.h test HAVE_LIMITS_H, HAVE_SYS_TYPES_H and HAVE_STDINT_H | |
311 | # plugin-api.h tests HAVE_STDINT_H and HAVE_INTTYPES_H | |
312 | # Besides those, we need to check anything used in ld/ not in C99. | |
313 | AC_CHECK_HEADERS(fcntl.h elf-hints.h limits.h inttypes.h stdint.h \ | |
314 | sys/file.h sys/mman.h sys/param.h sys/stat.h sys/time.h \ | |
315 | sys/types.h unistd.h) | |
316 | AC_CHECK_FUNCS(close glob lseek mkstemp open realpath sbrk waitpid) | |
317 | ||
318 | BFD_BINARY_FOPEN | |
319 | ||
320 | AC_CHECK_DECLS([asprintf, environ, sbrk]) | |
252b5132 | 321 | |
2aec968d L |
322 | AC_FUNC_MMAP |
323 | ||
b879806f | 324 | AC_SEARCH_LIBS([dlopen], [dl]) |
5d3236ee | 325 | |
34875e64 NC |
326 | AC_MSG_CHECKING(for a known getopt prototype in unistd.h) |
327 | AC_CACHE_VAL(ld_cv_decl_getopt_unistd_h, | |
da594c4a | 328 | [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <unistd.h>], [extern int getopt (int, char *const*, const char *);])], |
34875e64 NC |
329 | ld_cv_decl_getopt_unistd_h=yes, ld_cv_decl_getopt_unistd_h=no)]) |
330 | AC_MSG_RESULT($ld_cv_decl_getopt_unistd_h) | |
331 | if test $ld_cv_decl_getopt_unistd_h = yes; then | |
332 | AC_DEFINE([HAVE_DECL_GETOPT], 1, | |
333 | [Is the prototype for getopt in <unistd.h> in the expected format?]) | |
334 | fi | |
bf9ef603 | 335 | |
1ff6de03 NA |
336 | # Link in zlib if we can. This allows us to read and write |
337 | # compressed CTF sections. | |
338 | AM_ZLIB | |
339 | ||
597e2591 ILT |
340 | # When converting linker scripts into strings for use in emulation |
341 | # files, use astring.sed if the compiler supports ANSI string | |
342 | # concatenation, or ostring.sed otherwise. This is to support the | |
343 | # broken Microsoft MSVC compiler, which limits the length of string | |
344 | # constants, while still supporting pre-ANSI compilers which do not | |
345 | # support string concatenation. | |
e4dabd0e | 346 | AC_MSG_CHECKING([whether ANSI C string concatenation works]) |
597e2591 | 347 | AC_CACHE_VAL(ld_cv_string_concatenation, |
da594c4a AM |
348 | [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [char *a = "a" "a";])], |
349 | ld_cv_string_concatenation=yes, | |
350 | ld_cv_string_concatenation=no)]) | |
e4dabd0e AS |
351 | AC_MSG_RESULT($ld_cv_string_concatenation) |
352 | if test "$ld_cv_string_concatenation" = "yes"; then | |
597e2591 ILT |
353 | STRINGIFY=astring.sed |
354 | else | |
355 | STRINGIFY=ostring.sed | |
356 | fi | |
357 | AC_SUBST(STRINGIFY) | |
358 | ||
252b5132 RH |
359 | # target-specific stuff: |
360 | ||
361 | all_targets= | |
362 | EMUL= | |
363 | all_emuls= | |
364 | all_emul_extras= | |
ba2be581 | 365 | all_libpath= |
50ff67e6 | 366 | TDIRS= |
252b5132 | 367 | |
bf9ef603 | 368 | # If the host is 64-bit, then we enable 64-bit targets by default. |
1110793a | 369 | # This is consistent with what ../bfd/configure.ac does. |
bf9ef603 RM |
370 | if test x${want64} = xfalse; then |
371 | AC_CHECK_SIZEOF(void *) | |
372 | if test "x${ac_cv_sizeof_void_p}" = "x8"; then | |
373 | want64=true | |
374 | fi | |
375 | fi | |
376 | ||
f38a2680 AM |
377 | elf_list_options=false |
378 | elf_shlib_list_options=false | |
379 | elf_plt_unwind_list_options=false | |
252b5132 RH |
380 | for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'` |
381 | do | |
382 | if test "$targ_alias" = "all"; then | |
383 | all_targets=true | |
f38a2680 AM |
384 | elf_list_options=true |
385 | elf_shlib_list_options=true | |
386 | elf_plt_unwind_list_options=true | |
252b5132 RH |
387 | else |
388 | # Canonicalize the secondary target names. | |
42ecbf5e | 389 | result=`$ac_config_sub $targ_alias 2>/dev/null` |
252b5132 RH |
390 | if test -n "$result"; then |
391 | targ=$result | |
392 | else | |
393 | targ=$targ_alias | |
394 | fi | |
395 | ||
396 | . ${srcdir}/configure.tgt | |
397 | ||
398 | if test "$targ" = "$target"; then | |
399 | EMUL=$targ_emul | |
400 | fi | |
401 | ||
314e9a4e L |
402 | if test x${want64} = xfalse; then |
403 | . ${srcdir}/../bfd/config.bfd | |
404 | fi | |
405 | ||
534d3119 L |
406 | if test x${want64} = xtrue; then |
407 | targ_extra_emuls="$targ_extra_emuls $targ64_extra_emuls" | |
408 | targ_extra_libpath="$targ_extra_libpath $targ64_extra_libpath" | |
409 | fi | |
410 | ||
3336653a | 411 | for i in $targ_emul $targ_extra_emuls $targ_extra_libpath; do |
252b5132 | 412 | case " $all_emuls " in |
8c3fff59 AM |
413 | *" e${i}.o "*) ;; |
414 | *) | |
415 | all_emuls="$all_emuls e${i}.o" | |
416 | eval result=\$tdir_$i | |
417 | test -z "$result" && result=$targ_alias | |
50ff67e6 AM |
418 | TDIRS="$TDIRS |
419 | tdir_$i=$result" | |
c58212ea L |
420 | case "${i}" in |
421 | *elf*) | |
f38a2680 | 422 | elf_list_options=true |
68880f31 CLT |
423 | ;; |
424 | *) | |
075a2b89 | 425 | if $GREP "TEMPLATE_NAME=elf" ${srcdir}/emulparams/${i}.sh >/dev/null 2>/dev/null; then |
f38a2680 | 426 | elf_list_options=true |
68880f31 CLT |
427 | fi |
428 | ;; | |
429 | esac | |
f38a2680 | 430 | if test "$elf_list_options" = "true"; then |
c40e31a1 AM |
431 | source_sh() |
432 | { | |
433 | . $1 | |
434 | } | |
435 | source_sh ${srcdir}/emulparams/${i}.sh | |
c58212ea | 436 | if test x${GENERATE_SHLIB_SCRIPT} = xyes; then |
f38a2680 | 437 | elf_shlib_list_options=true |
c58212ea L |
438 | fi |
439 | if test x${PLT_UNWIND} = xyes; then | |
f38a2680 | 440 | elf_plt_unwind_list_options=true |
c58212ea | 441 | fi |
68880f31 | 442 | fi |
c58212ea | 443 | ;; |
252b5132 RH |
444 | esac |
445 | done | |
446 | ||
ba2be581 | 447 | for i in $targ_emul $targ_extra_libpath; do |
3336653a RH |
448 | case " $all_libpath " in |
449 | *" ${i} "*) ;; | |
450 | *) | |
ba2be581 RH |
451 | if test -z "$all_libpath"; then |
452 | all_libpath=${i} | |
453 | else | |
454 | all_libpath="$all_libpath ${i}" | |
455 | fi | |
3336653a RH |
456 | ;; |
457 | esac | |
458 | done | |
459 | ||
252b5132 RH |
460 | for i in $targ_extra_ofiles; do |
461 | case " $all_emul_extras " in | |
462 | *" ${i} "*) ;; | |
463 | *) | |
464 | all_emul_extras="$all_emul_extras ${i}" | |
465 | ;; | |
466 | esac | |
467 | done | |
5063daf7 | 468 | |
252b5132 RH |
469 | fi |
470 | done | |
471 | ||
621ff761 | 472 | if test x$ac_default_compressed_debug_sections = xyes ; then |
6c3bc0f8 NC |
473 | AC_DEFINE(DEFAULT_FLAG_COMPRESS_DEBUG, 1, [Define if you want compressed debug sections by default.]) |
474 | fi | |
475 | ||
6734f10a SB |
476 | if test "${ac_default_new_dtags}" = unset; then |
477 | ac_default_new_dtags=0 | |
478 | fi | |
479 | AC_DEFINE_UNQUOTED(DEFAULT_NEW_DTAGS, | |
480 | $ac_default_new_dtags, | |
481 | [Define to 1 if you want to set DT_RUNPATH instead of DT_RPATH by default.]) | |
482 | ||
647e4d46 L |
483 | if test "${ac_default_ld_z_relro}" = unset; then |
484 | ac_default_ld_z_relro=0 | |
485 | fi | |
486 | AC_DEFINE_UNQUOTED(DEFAULT_LD_Z_RELRO, | |
487 | $ac_default_ld_z_relro, | |
488 | [Define to 1 if you want to enable -z relro in ELF linker by default.]) | |
489 | ||
b32632c4 L |
490 | ac_default_ld_textrel_check_warning=0 |
491 | case "${ac_default_ld_textrel_check}" in | |
492 | unset|no) | |
493 | ac_default_ld_textrel_check=textrel_check_none | |
494 | ;; | |
495 | yes|warning) | |
496 | ac_default_ld_textrel_check=textrel_check_warning | |
497 | ac_default_ld_textrel_check_warning=1 | |
498 | ;; | |
499 | error) | |
500 | ac_default_ld_textrel_check=textrel_check_error | |
501 | ;; | |
502 | esac | |
503 | AC_DEFINE_UNQUOTED(DEFAULT_LD_TEXTREL_CHECK, | |
504 | $ac_default_ld_textrel_check, | |
505 | [The default method for DT_TEXTREL check in ELF linker.]) | |
506 | AC_DEFINE_UNQUOTED(DEFAULT_LD_TEXTREL_CHECK_WARNING, | |
507 | $ac_default_ld_textrel_check_warning, | |
508 | [Define to 1 if DT_TEXTREL check is warning in ELF linker by default.]) | |
509 | ||
f6aec96d L |
510 | if test "${ac_default_ld_z_separate_code}" = unset; then |
511 | ac_default_ld_z_separate_code=0 | |
512 | fi | |
513 | AC_DEFINE_UNQUOTED(DEFAULT_LD_Z_SEPARATE_CODE, | |
514 | $ac_default_ld_z_separate_code, | |
515 | [Define to 1 if you want to enable -z separate-code in ELF linker by default.]) | |
516 | ||
23ae20f5 NC |
517 | if test "${ac_support_error_handling_script}" = unset; then |
518 | ac_support_error_handling_script=1 | |
519 | fi | |
520 | AC_DEFINE_UNQUOTED(SUPPORT_ERROR_HANDLING_SCRIPT, | |
521 | $ac_support_error_handling_script, | |
522 | [Define to 1 if you want to support the --error-handling-script command line option.]) | |
523 | ||
2760f24c RG |
524 | AC_DEFINE_UNQUOTED([DEFAULT_EMIT_SYSV_HASH], |
525 | [$ac_default_emit_sysv_hash], | |
526 | [Define to 1 if you want to emit sysv hash in the ELF linker by default.]) | |
527 | ||
528 | AC_DEFINE_UNQUOTED([DEFAULT_EMIT_GNU_HASH], | |
529 | [$ac_default_emit_gnu_hash], | |
530 | [Define to 1 if you want to emit gnu hash in the ELF linker by default.]) | |
531 | ||
c58212ea L |
532 | AC_SUBST(elf_list_options) |
533 | AC_SUBST(elf_shlib_list_options) | |
534 | AC_SUBST(elf_plt_unwind_list_options) | |
252b5132 RH |
535 | AC_SUBST(EMUL) |
536 | ||
50ff67e6 AM |
537 | AC_SUBST(TDIRS) |
538 | AM_SUBST_NOTMAKE(TDIRS) | |
252b5132 | 539 | |
252b5132 RH |
540 | if test x${all_targets} = xtrue; then |
541 | if test x${want64} = xtrue; then | |
542 | EMULATION_OFILES='$(ALL_EMULATIONS) $(ALL_64_EMULATIONS)' | |
9d069ac3 | 543 | EMUL_EXTRA_OFILES='$(ALL_EMUL_EXTRA_OFILES) $(ALL_64_EMUL_EXTRA_OFILES)' |
252b5132 RH |
544 | else |
545 | EMULATION_OFILES='$(ALL_EMULATIONS)' | |
9d069ac3 | 546 | EMUL_EXTRA_OFILES='$(ALL_EMUL_EXTRA_OFILES)' |
252b5132 | 547 | fi |
252b5132 RH |
548 | else |
549 | EMULATION_OFILES=$all_emuls | |
550 | EMUL_EXTRA_OFILES=$all_emul_extras | |
551 | fi | |
552 | AC_SUBST(EMULATION_OFILES) | |
553 | AC_SUBST(EMUL_EXTRA_OFILES) | |
8e523c23 | 554 | AC_SUBST(LIB_PATH) |
252b5132 | 555 | |
3336653a RH |
556 | EMULATION_LIBPATH=$all_libpath |
557 | AC_SUBST(EMULATION_LIBPATH) | |
558 | ||
252b5132 | 559 | if test x${enable_static} = xno; then |
9165f454 | 560 | TESTBFDLIB="-Wl,--rpath,../bfd/.libs ../bfd/.libs/libbfd.so" |
87279e3c | 561 | TESTCTFLIB="-Wl,--rpath,../libctf/.libs ../libctf/.libs/libctf.so" |
252b5132 RH |
562 | else |
563 | TESTBFDLIB="../bfd/.libs/libbfd.a" | |
87279e3c | 564 | TESTCTFLIB="../libctf/.libs/libctf.a" |
252b5132 | 565 | fi |
094e34f2 NA |
566 | if test "${enable_libctf}" = no; then |
567 | TESTCTFLIB= | |
568 | fi | |
252b5132 | 569 | AC_SUBST(TESTBFDLIB) |
87279e3c | 570 | AC_SUBST(TESTCTFLIB) |
252b5132 | 571 | |
93a6d436 JL |
572 | target_vendor=${target_vendor=$host_vendor} |
573 | case "$target_vendor" in | |
574 | hp) EXTRA_SHLIB_EXTENSION=".sl" ;; | |
575 | *) EXTRA_SHLIB_EXTENSION= ;; | |
576 | esac | |
f234d5fe NC |
577 | |
578 | case "$target_os" in | |
579 | lynxos) EXTRA_SHLIB_EXTENSION=".a" ;; | |
580 | esac | |
581 | ||
93a6d436 JL |
582 | if test x${EXTRA_SHLIB_EXTENSION} != x ; then |
583 | AC_DEFINE_UNQUOTED(EXTRA_SHLIB_EXTENSION, "$EXTRA_SHLIB_EXTENSION", | |
584 | [Additional extension a shared object might have.]) | |
585 | fi | |
586 | ||
33589acb AM |
587 | AC_CONFIG_COMMANDS([default], |
588 | [[ | |
589 | case "$srcdir" in | |
590 | .) srcdirpre= ;; | |
591 | *) srcdirpre='$(srcdir)/' ;; | |
592 | esac | |
593 | POFILES= | |
594 | GMOFILES= | |
595 | for lang in dummy $OBSOLETE_ALL_LINGUAS; do | |
596 | if test $lang != dummy; then | |
597 | POFILES="$POFILES $srcdirpre$lang.po" | |
598 | GMOFILES="$GMOFILES $srcdirpre$lang.gmo" | |
599 | fi | |
600 | done | |
601 | sed -e '/^SRC-POTFILES =/r po/SRC-POTFILES' \ | |
602 | -e '/^BLD-POTFILES =/r po/BLD-POTFILES' \ | |
603 | -e "s,@POFILES@,$POFILES," \ | |
604 | -e "s,@GMOFILES@,$GMOFILES," \ | |
605 | po/Makefile.in > po/Makefile]],[[]]) | |
606 | ||
31dd3154 | 607 | dnl Required by html, pdf, install-pdf and install-html |
108a6f8e CD |
608 | AC_SUBST(datarootdir) |
609 | AC_SUBST(docdir) | |
610 | AC_SUBST(htmldir) | |
31dd3154 | 611 | AC_SUBST(pdfdir) |
108a6f8e | 612 | |
da594c4a AM |
613 | AC_CONFIG_FILES(Makefile po/Makefile.in:po/Make-in) |
614 | AC_OUTPUT | |
d546b610 L |
615 | |
616 | GNU_MAKE_JOBSERVER |