1 dnl Process this file with autoconf to produce a configure script
3 dnl Copyright (C) 2012-2025 Free Software Foundation, Inc.
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.
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.
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/>.
20 m4_include([../bfd/version.m4])
21 AC_INIT([ld], [BFD_VERSION])
22 AC_CONFIG_SRCDIR(ldmain.c)
28 AM_SILENT_RULES([yes])
34 AC_USE_SYSTEM_EXTENSIONS
42 . ${srcdir}/../bfd/development.sh
43 test "$development" = true && ac_checking=yes
44 AC_ARG_ENABLE(checking,
45 [ --enable-checking enable run-time checks],
46 [case "${enableval}" in
47 no|none) ac_checking= ;;
50 if test x$ac_checking != x ; then
51 AC_DEFINE(ENABLE_CHECKING, 1, [Define if you want run-time sanity checks.])
54 AC_ARG_WITH(lib-path, [ --with-lib-path=dir1:dir2... set default LIB_PATH],LIB_PATH=$withval)
55 AC_ARG_ENABLE(targets,
56 [ --enable-targets alternative target configurations],
57 [case "${enableval}" in
58 yes | "") AC_MSG_ERROR(enable-targets option must specify target names or 'all')
60 no) enable_targets= ;;
61 *) enable_targets=$enableval ;;
67 [ --with-sysroot[=DIR] Search for usr/lib et al within DIR.],
69 case ${with_sysroot} in
70 yes) TARGET_SYSTEM_ROOT='${exec_prefix}/${target_alias}/sys-root' ;;
71 *) TARGET_SYSTEM_ROOT=$with_sysroot ;;
74 TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"$(TARGET_SYSTEM_ROOT)\"'
77 if test "x$prefix" = xNONE; then
78 test_prefix=/usr/local
82 if test "x$exec_prefix" = xNONE; then
83 test_exec_prefix=$test_prefix
85 test_exec_prefix=$exec_prefix
87 case ${TARGET_SYSTEM_ROOT} in
88 "${test_prefix}"|"${test_prefix}/"*|\
89 "${test_exec_prefix}"|"${test_exec_prefix}/"*|\
90 '${prefix}'|'${prefix}/'*|\
91 '${exec_prefix}'|'${exec_prefix}/'*)
92 t="$TARGET_SYSTEM_ROOT_DEFINE -DTARGET_SYSTEM_ROOT_RELOCATABLE"
93 TARGET_SYSTEM_ROOT_DEFINE="$t"
99 TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"\"'
101 AC_SUBST(use_sysroot)
102 AC_SUBST(TARGET_SYSTEM_ROOT)
103 AC_SUBST(TARGET_SYSTEM_ROOT_DEFINE)
105 dnl Use --enable-gold to decide if this linker should be the default.
106 dnl "install_as_default" is set to false if gold is the default linker.
107 dnl "installed_linker" is the installed BFD linker name.
109 [[ --enable-gold[=ARG] build gold [ARG={default,yes,no}]]],
110 [case "${enableval}" in
112 install_as_default=no
113 installed_linker=ld.bfd
116 install_as_default=yes
117 installed_linker=ld.bfd
120 AC_MSG_ERROR([invalid --enable-gold argument])
123 [install_as_default=yes
124 installed_linker=ld.bfd])
125 AC_SUBST(install_as_default)
126 AC_SUBST(installed_linker)
129 AS_HELP_STRING([--enable-got=<type>],
130 [GOT handling scheme (target, single, negative, multigot)]),
131 [case "${enableval}" in
132 target | single | negative | multigot) got_handling=$enableval ;;
133 *) AC_MSG_ERROR(bad value ${enableval} for --enable-got option) ;;
135 [got_handling=target])
137 case "${got_handling}" in
139 AC_DEFINE([GOT_HANDLING_DEFAULT], [GOT_HANDLING_TARGET_DEFAULT],
140 [Define to choose default GOT handling scheme]) ;;
142 AC_DEFINE([GOT_HANDLING_DEFAULT], [GOT_HANDLING_SINGLE],
143 [Define to choose default GOT handling scheme]) ;;
145 AC_DEFINE([GOT_HANDLING_DEFAULT], [GOT_HANDLING_NEGATIVE],
146 [Define to choose default GOT handling scheme]) ;;
148 AC_DEFINE([GOT_HANDLING_DEFAULT], [GOT_HANDLING_MULTIGOT],
149 [Define to choose default GOT handling scheme]) ;;
150 *) AC_MSG_ERROR(bad value ${got_handling} for --enable-got option) ;;
154 # Decide the default method for compressing debug sections.
155 ac_default_compressed_debug_sections=unset
156 # Provide a configure time option to override our default.
157 AC_ARG_ENABLE(compressed_debug_sections,
158 AS_HELP_STRING([--enable-compressed-debug-sections={all,ld,none}],
159 [compress debug sections by default])],
160 [case ,"${enableval}", in
161 ,yes, | ,all, | *,ld,*) ac_default_compressed_debug_sections=yes ;;
162 ,no, | ,none,) ac_default_compressed_debug_sections=no ;;
165 # Select default compression algorithm.
166 ac_default_compressed_debug_sections_algorithm=COMPRESS_DEBUG_GABI_ZLIB
167 AC_ARG_ENABLE(default_compressed_debug_sections_algorithm,
168 AS_HELP_STRING([--enable-default-compressed-debug-sections-algorithm={zlib,zstd}],
169 [Default compression algorithm for --enable-compressed-debug-sections.]),
170 [case "${enableval}" in
171 zstd) ac_default_compressed_debug_sections_algorithm=COMPRESS_DEBUG_ZSTD ;;
174 # Decide setting DT_RUNPATH instead of DT_RPATH by default
175 ac_default_new_dtags=unset
176 # Provide a configure time option to override our default.
177 AC_ARG_ENABLE(new_dtags,
178 AS_HELP_STRING([--enable-new-dtags],
179 [set DT_RUNPATH instead of DT_RPATH by default])],
180 [case "${enableval}" in
181 yes) ac_default_new_dtags=1 ;;
182 no) ac_default_new_dtags=0 ;;
185 # Decide if -z relro should be enabled in ELF linker by default.
186 ac_default_ld_z_relro=unset
187 # Provide a configure time option to override our default.
189 AS_HELP_STRING([--enable-relro],
190 [enable -z relro in ELF linker by default]),
191 [case "${enableval}" in
192 yes) ac_default_ld_z_relro=1 ;;
193 no) ac_default_ld_z_relro=0 ;;
196 # Decide if DT_TEXTREL check should be enabled in ELF linker.
197 ac_default_ld_textrel_check=unset
198 AC_ARG_ENABLE([textrel-check],
199 AS_HELP_STRING([--enable-textrel-check=@<:@yes|no|warning|error@:>@],
200 [enable DT_TEXTREL check in ELF linker]),
201 [case "${enableval}" in
202 yes|no|warning|error) ac_default_ld_textrel_check=${enableval} ;;
205 # Decide if -z separate-code should be enabled in ELF linker by default.
206 ac_default_ld_z_separate_code=unset
207 AC_ARG_ENABLE(separate-code,
208 AS_HELP_STRING([--enable-separate-code],
209 [enable -z separate-code in ELF linker by default]),
210 [case "${enableval}" in
211 yes) ac_default_ld_z_separate_code=1 ;;
212 no) ac_default_ld_z_separate_code=0 ;;
215 # Decide if --rosegment should be enabled in the ELF linker by default.
216 ac_default_ld_rosegment=unset
217 AC_ARG_ENABLE(rosegment,
218 AS_HELP_STRING([--enable-rosegment],
219 [enable --rosegment in the ELF linker by default]),
220 [case "${enableval}" in
221 yes) ac_default_ld_rosegment=1 ;;
222 no) ac_default_ld_rosegment=0 ;;
225 # Decide if -z mark-plt should be enabled in ELF x86-64 linker by default.
226 ac_default_ld_z_mark_plt=unset
227 AC_ARG_ENABLE(mark-plt,
228 AS_HELP_STRING([--enable-mark-plt],
229 [enable -z mark-plt in ELF x86-64 linker by default]),
230 [case "${enableval}" in
231 yes) ac_default_ld_z_mark_plt=1 ;;
232 no) ac_default_ld_z_mark_plt=0 ;;
235 # Decide if -z memory-seal should be enabled in ELF linker by default.
236 ac_default_ld_z_memory_seal=unset
237 AC_ARG_ENABLE(memory-seal,
238 AS_HELP_STRING([--enable-memory-seal],
239 [enable -z memory-seal in ELF linker by default]),
240 [case "${enableval}" in
241 yes) ac_default_ld_z_memory_seal=1 ;;
242 no) ac_default_ld_z_memory_seal=0 ;;
246 # By default warn when an executable stack is created due to object files
247 # requesting such, not when the user specifies -z execstack.
248 ac_default_ld_warn_execstack=2
249 AC_ARG_ENABLE(warn-execstack,
250 AS_HELP_STRING([--enable-warn-execstack],
251 [enable warnings when creating an executable stack]),
252 [case "${enableval}" in
253 yes) ac_default_ld_warn_execstack=1 ;;
254 no) ac_default_ld_warn_execstack=0 ;;
257 ac_default_ld_error_execstack=0
258 AC_ARG_ENABLE(error-execstack,
259 AS_HELP_STRING([--enable-error-execstack],
260 [turn executable stack warnings into errors]),
261 [case "${enableval}" in
262 yes) ac_default_ld_error_execstack=1 ;;
263 no) ac_default_ld_error_execstack=0 ;;
266 ac_default_ld_warn_rwx_segments=unset
267 AC_ARG_ENABLE(warn-rwx-segments,
268 AS_HELP_STRING([--enable-warn-rwx-segments],
269 [enable warnings when creating segments with RWX permissions]),
270 [case "${enableval}" in
271 yes) ac_default_ld_warn_rwx_segments=1 ;;
272 no) ac_default_ld_warn_rwx_segments=0 ;;
275 ac_default_ld_error_rwx_segments=0
276 AC_ARG_ENABLE(error-rwx-segments,
277 AS_HELP_STRING([--enable-error-rwx-segments],
278 [turn executable segment warnings into errors]),
279 [case "${enableval}" in
280 yes) ac_default_ld_error_rwx_segments=1 ;;
281 no) ac_default_ld_error_rwx_segments=0 ;;
284 ac_default_ld_default_execstack=unset
285 AC_ARG_ENABLE(default-execstack,
286 AS_HELP_STRING([--enable-default-execstack],
287 [create an executable stack if an input file is missing a .note.GNU-stack section]),
288 [case "${enableval}" in
289 yes) ac_default_ld_default_execstack=1 ;;
290 no) ac_default_ld_default_execstack=0 ;;
294 # Decide if --error-handling-script should be supported.
295 ac_support_error_handling_script=unset
296 AC_ARG_ENABLE(error-handling-script,
297 AS_HELP_STRING([--enable-error-handling-script],
298 [enable/disable support for the --error-handling-script option]),
299 [case "${enableval}" in
300 yes) ac_support_error_handling_script=1 ;;
301 no) ac_support_error_handling_script=0 ;;
304 # Decide which "--hash-style" to use by default
305 # Provide a configure time option to override our default.
306 AC_ARG_ENABLE([default-hash-style],
307 AS_HELP_STRING([--enable-default-hash-style={sysv,gnu,both}],
308 [use this default hash style]),
309 [case "${enable_default_hash_style}" in
310 sysv | gnu | both) ;;
311 *) AC_MSG_ERROR([bad value ${enable_default_hash_style} for enable-default-hash-style option]) ;;
314 # Enable gnu hash only on GNU targets, but not mips
315 mips*-*-*) enable_default_hash_style=sysv ;;
316 *-*-gnu* | *-*-linux* | *-*-nacl*) enable_default_hash_style=both ;;
317 *) enable_default_hash_style=sysv ;;
320 case "${enable_default_hash_style}" in
321 sysv | both) ac_default_emit_sysv_hash=1 ;;
322 *) ac_default_emit_sysv_hash=0 ;;
325 case "${enable_default_hash_style}" in
326 gnu | both) ac_default_emit_gnu_hash=1 ;;
327 *) ac_default_emit_gnu_hash=0 ;;
330 AC_ARG_ENABLE(initfini-array,
331 [ --disable-initfini-array do not use .init_array/.fini_array sections],
332 [case "${enableval}" in
334 *) AC_MSG_ERROR([invalid --enable-initfini-array argument]) ;;
335 esac], [enable_initfini_array=yes])
336 AC_SUBST(enable_initfini_array)
337 if test $enable_initfini_array = yes; then
338 AC_DEFINE(HAVE_INITFINI_ARRAY, 1,
339 [Define .init_array/.fini_array sections are available and working.])
342 GCC_ENABLE([libctf], [yes], [], [Handle .ctf type-info sections])
343 if test "${enable_libctf}" = yes; then
344 AC_DEFINE(ENABLE_LIBCTF, 1, [Handle .ctf type-info sections])
346 AM_CONDITIONAL(ENABLE_LIBCTF, test "${enable_libctf}" = yes)
347 AC_SUBST(enable_libctf)
349 # Used to validate --package-metadata= input. Disabled by default.
350 AC_ARG_ENABLE([jansson],
351 [AS_HELP_STRING([--enable-jansson],
352 [enable jansson [default=no]])],
353 [enable_jansson=$enableval],
354 [enable_jansson="no"])
356 AS_IF([test "x$enable_jansson" != "xno"],
357 [PKG_CHECK_MODULES(JANSSON, [jansson],
359 AC_DEFINE(HAVE_JANSSON, 1, [The jansson library is to be used])
360 AC_SUBST([JANSSON_CFLAGS])
361 AC_SUBST([JANSSON_LIBS])
363 [AC_MSG_ERROR([Cannot find jansson library])])
370 AC_CONFIG_HEADERS([config.h:config.in])
373 AH_VERBATIM([00_CONFIG_H_CHECK],
374 [/* Check that config.h is #included before system headers
375 (this works only for glibc, but that should be enough). */
376 #if defined(__GLIBC__) && !defined(__FreeBSD_kernel__) && !defined(__CONFIG_H__)
377 # error config.h must be #included before system headers
379 #define __CONFIG_H__ 1])
381 if test -z "$target" ; then
382 AC_MSG_ERROR(Unrecognized target system type; please check config.sub.)
384 if test -z "$host" ; then
385 AC_MSG_ERROR(Unrecognized host system type; please check config.sub.)
388 # host-specific stuff:
390 ALL_LINGUAS="bg da de es fi fr ga id it ja pt_BR ru sr sv tr uk vi zh_CN zh_TW"
391 ZW_GNU_GETTEXT_SISTER_DIR
400 AM_CONDITIONAL(GENINSRC_NEVER, false)
401 ACX_PROG_CMP_IGNORE_INITIAL
403 . ${srcdir}/configure.host
406 AC_SUBST(NATIVE_LIB_DIRS)
408 # We use headers from include/ that check various HAVE_*_H macros, thus
409 # should ensure they are set by configure. This is true even when C99
410 # guarantees they are available.
411 # sha1.h and md4.h test HAVE_LIMITS_H, HAVE_SYS_TYPES_H and HAVE_STDINT_H
412 # plugin-api.h tests HAVE_STDINT_H and HAVE_INTTYPES_H
413 # Besides those, we need to check anything used in ld/ not in C99.
414 AC_CHECK_HEADERS(fcntl.h elf-hints.h limits.h inttypes.h stdint.h \
415 sys/file.h sys/mman.h sys/param.h sys/stat.h sys/time.h \
416 sys/types.h unistd.h)
417 AC_CHECK_FUNCS(close glob lseek mkstemp open realpath waitpid)
421 AC_CHECK_DECLS([environ, stpcpy])
425 AC_SEARCH_LIBS([dlopen], [dl])
427 AC_MSG_CHECKING(for a known getopt prototype in unistd.h)
428 AC_CACHE_VAL(ld_cv_decl_getopt_unistd_h,
429 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <unistd.h>], [extern int getopt (int, char *const*, const char *);])],
430 ld_cv_decl_getopt_unistd_h=yes, ld_cv_decl_getopt_unistd_h=no)])
431 AC_MSG_RESULT($ld_cv_decl_getopt_unistd_h)
432 if test $ld_cv_decl_getopt_unistd_h = yes; then
433 AC_DEFINE([HAVE_DECL_GETOPT], 1,
434 [Is the prototype for getopt in <unistd.h> in the expected format?])
437 dnl xxhash support from gdbsupport/common.m4
438 AC_MSG_CHECKING([whether to use xxhash])
440 AS_HELP_STRING([--with-xxhash], [use inlined libxxhash for hashing (faster) (auto/yes/no)]),
441 [], [with_xxhash=auto])
442 if test "x$with_xxhash" != "xno"; then
443 AC_COMPILE_IFELSE([AC_LANG_SOURCE([
444 #define XXH_INLINE_ALL
447 void foo (void) { r = XXH128("foo", 3, 0); }
450 AC_DEFINE([WITH_XXHASH], 1, [whether to use inline xxhash])
452 if test "$with_xxhash" = yes; then
453 AC_MSG_ERROR([xxhash is missing or unusable])
457 AC_MSG_RESULT([$with_xxhash])
459 # Link in zlib/zstd if we can. This allows us to read and write
460 # compressed debug sections.
464 # target-specific stuff:
473 elf_list_options=false
474 elf_shlib_list_options=false
475 elf_plt_unwind_list_options=false
476 for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'`
478 if test "$targ_alias" = "all"; then
480 elf_list_options=true
481 elf_shlib_list_options=true
482 elf_plt_unwind_list_options=true
484 # Canonicalize the secondary target names.
485 result=`$ac_config_sub $targ_alias 2>/dev/null`
486 if test -n "$result"; then
492 . ${srcdir}/configure.tgt
494 if test "$targ" = "$target"; then
498 if test x${enable_64_bit_bfd} = xno; then
499 . ${srcdir}/../bfd/config.bfd
502 if test x${enable_64_bit_bfd} = xyes; then
503 targ_extra_emuls="$targ_extra_emuls $targ64_extra_emuls"
504 targ_extra_libpath="$targ_extra_libpath $targ64_extra_libpath"
507 for i in $targ_emul $targ_extra_emuls $targ_extra_libpath; do
508 case " $all_emuls " in
511 all_emuls="$all_emuls e${i}.o"
512 eval result=\$tdir_$i
513 test -z "$result" && result=$targ_alias
518 elf_list_options=true
521 if $GREP "TEMPLATE_NAME=elf" ${srcdir}/emulparams/${i}.sh >/dev/null 2>/dev/null; then
522 elf_list_options=true
526 if test "$elf_list_options" = "true"; then
531 source_sh ${srcdir}/emulparams/${i}.sh
532 if test x${GENERATE_SHLIB_SCRIPT} = xyes; then
533 elf_shlib_list_options=true
535 if test x${PLT_UNWIND} = xyes; then
536 elf_plt_unwind_list_options=true
543 for i in $targ_emul $targ_extra_libpath; do
544 case " $all_libpath " in
547 if test -z "$all_libpath"; then
550 all_libpath="$all_libpath ${i}"
556 for i in $targ_extra_ofiles; do
557 case " $all_emul_extras " in
560 all_emul_extras="$all_emul_extras ${i}"
568 if test x$ac_default_compressed_debug_sections = xyes ; then
569 AC_DEFINE(DEFAULT_FLAG_COMPRESS_DEBUG, 1, [Define if you want compressed debug sections by default.])
572 AC_DEFINE_UNQUOTED(DEFAULT_COMPRESSED_DEBUG_ALGORITHM, $ac_default_compressed_debug_sections_algorithm,
573 [Default compression algorithm for --enable-compressed-debug-sections.])
575 if test "${ac_default_new_dtags}" = unset; then
576 ac_default_new_dtags=0
578 AC_DEFINE_UNQUOTED(DEFAULT_NEW_DTAGS,
579 $ac_default_new_dtags,
580 [Define to 1 if you want to set DT_RUNPATH instead of DT_RPATH by default.])
582 if test "${ac_default_ld_z_relro}" = unset; then
583 ac_default_ld_z_relro=0
585 AC_DEFINE_UNQUOTED(DEFAULT_LD_Z_RELRO,
586 $ac_default_ld_z_relro,
587 [Define to 1 if you want to enable -z relro in ELF linker by default.])
589 ac_default_ld_textrel_check_warning=0
590 case "${ac_default_ld_textrel_check}" in
592 ac_default_ld_textrel_check=textrel_check_none
595 ac_default_ld_textrel_check=textrel_check_warning
596 ac_default_ld_textrel_check_warning=1
599 ac_default_ld_textrel_check=textrel_check_error
602 AC_DEFINE_UNQUOTED(DEFAULT_LD_TEXTREL_CHECK,
603 $ac_default_ld_textrel_check,
604 [The default method for DT_TEXTREL check in ELF linker.])
605 AC_DEFINE_UNQUOTED(DEFAULT_LD_TEXTREL_CHECK_WARNING,
606 $ac_default_ld_textrel_check_warning,
607 [Define to 1 if DT_TEXTREL check is warning in ELF linker by default.])
609 if test "${ac_default_ld_z_separate_code}" = unset; then
610 ac_default_ld_z_separate_code=0
612 AC_DEFINE_UNQUOTED(DEFAULT_LD_Z_SEPARATE_CODE,
613 $ac_default_ld_z_separate_code,
614 [Define to 1 if you want to enable -z separate-code in ELF linker by default.])
616 if test "${ac_default_ld_rosegment}" = unset; then
617 ac_default_ld_rosegment=0
619 AC_DEFINE_UNQUOTED(DEFAULT_LD_ROSEGMENT,
620 $ac_default_ld_rosegment,
621 [Define to 1 if you want to enable --rosegment in the ELF linker by default.])
623 if test "${ac_default_ld_z_mark_plt}" = unset; then
624 ac_default_ld_z_mark_plt=0
626 AC_DEFINE_UNQUOTED(DEFAULT_LD_Z_MARK_PLT,
627 $ac_default_ld_z_mark_plt,
628 [Define to 1 if you want to enable -z mark-plt in ELF x86-64 linker by default.])
630 if test "${ac_default_ld_z_memory_seal}" = unset; then
631 ac_default_ld_z_memory_seal=0
633 AC_DEFINE_UNQUOTED(DEFAULT_LD_Z_MEMORY_SEAL,
634 $ac_default_ld_z_memory_seal,
635 [Define to 1 if you want to enable -z memory_seal in ELF linker by default.])
638 AC_DEFINE_UNQUOTED(DEFAULT_LD_WARN_EXECSTACK,
639 $ac_default_ld_warn_execstack,
640 [Define to 1 if you want to enable --warn-execstack in ELF linker by default.])
642 AC_DEFINE_UNQUOTED(DEFAULT_LD_ERROR_EXECSTACK,
643 $ac_default_ld_error_execstack,
644 [Define to 1 if you want to turn executable stack warnings into errors by default.])
646 if test "${ac_default_ld_warn_rwx_segments}" = unset; then
647 ac_default_ld_warn_rwx_segments=1
649 AC_DEFINE_UNQUOTED(DEFAULT_LD_WARN_RWX_SEGMENTS,
650 $ac_default_ld_warn_rwx_segments,
651 [Define to 0 if you want to disable --warn-rwx-segments in ELF linker by default.])
653 AC_DEFINE_UNQUOTED(DEFAULT_LD_ERROR_RWX_SEGMENTS,
654 $ac_default_ld_error_rwx_segments,
655 [Define to 1 if you want to turn executable segment warnings into errors by default.])
657 if test "${ac_default_ld_default_execstack}" = unset; then
658 ac_default_ld_default_execstack=1
660 AC_DEFINE_UNQUOTED(DEFAULT_LD_EXECSTACK,
661 $ac_default_ld_default_execstack,
662 [Define to 0 if you want to disable the generation of an executable stack when a .note-GNU-stack section is missing.])
665 if test "${ac_support_error_handling_script}" = unset; then
666 ac_support_error_handling_script=1
668 AC_DEFINE_UNQUOTED(SUPPORT_ERROR_HANDLING_SCRIPT,
669 $ac_support_error_handling_script,
670 [Define to 1 if you want to support the --error-handling-script command line option.])
672 AC_DEFINE_UNQUOTED([DEFAULT_EMIT_SYSV_HASH],
673 [$ac_default_emit_sysv_hash],
674 [Define to 1 if you want to emit sysv hash in the ELF linker by default.])
676 AC_DEFINE_UNQUOTED([DEFAULT_EMIT_GNU_HASH],
677 [$ac_default_emit_gnu_hash],
678 [Define to 1 if you want to emit gnu hash in the ELF linker by default.])
680 AC_SUBST(elf_list_options)
681 AC_SUBST(elf_shlib_list_options)
682 AC_SUBST(elf_plt_unwind_list_options)
686 AM_SUBST_NOTMAKE(TDIRS)
688 if test x${all_targets} = xtrue; then
689 if test x${enable_64_bit_bfd} = xyes; then
690 EMULATION_OFILES='$(ALL_EMULATIONS) $(ALL_64_EMULATIONS)'
691 EMUL_EXTRA_OFILES='$(ALL_EMUL_EXTRA_OFILES) $(ALL_64_EMUL_EXTRA_OFILES)'
693 EMULATION_OFILES='$(ALL_EMULATIONS)'
694 EMUL_EXTRA_OFILES='$(ALL_EMUL_EXTRA_OFILES)'
697 EMULATION_OFILES=$all_emuls
698 EMUL_EXTRA_OFILES=$all_emul_extras
700 AC_SUBST(EMULATION_OFILES)
701 AC_SUBST(EMUL_EXTRA_OFILES)
704 EMULATION_LIBPATH=$all_libpath
705 AC_SUBST(EMULATION_LIBPATH)
707 if test x${enable_static} = xno; then
708 TESTBFDLIB="-Wl,--rpath,../bfd/.libs ../bfd/.libs/libbfd.so"
709 TESTCTFLIB="-Wl,--rpath,../libctf/.libs ../libctf/.libs/libctf.so"
710 TESTSFRAMELIB="-Wl,--rpath,../libsframe/.libs ../libsframe/.libs/libsframe.so"
712 TESTBFDLIB="../bfd/.libs/libbfd.a"
713 TESTCTFLIB="../libctf/.libs/libctf.a"
714 TESTSFRAMELIB="../libsframe/.libs/libsframe.a"
716 if test "${enable_libctf}" = no; then
721 AC_SUBST(TESTSFRAMELIB)
723 target_vendor=${target_vendor=$host_vendor}
724 case "$target_vendor" in
725 hp) EXTRA_SHLIB_EXTENSION=".sl" ;;
726 *) EXTRA_SHLIB_EXTENSION= ;;
730 lynxos) EXTRA_SHLIB_EXTENSION=".a" ;;
733 if test x${EXTRA_SHLIB_EXTENSION} != x ; then
734 AC_DEFINE_UNQUOTED(EXTRA_SHLIB_EXTENSION, "$EXTRA_SHLIB_EXTENSION",
735 [Additional extension a shared object might have.])
738 AC_CONFIG_COMMANDS([default],
742 *) srcdirpre='$(srcdir)/' ;;
746 for lang in dummy $OBSOLETE_ALL_LINGUAS; do
747 if test $lang != dummy; then
748 POFILES="$POFILES $srcdirpre$lang.po"
749 GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
752 sed -e '/^SRC-POTFILES =/r po/SRC-POTFILES' \
753 -e '/^BLD-POTFILES =/r po/BLD-POTFILES' \
754 -e "s,@POFILES@,$POFILES," \
755 -e "s,@GMOFILES@,$GMOFILES," \
756 po/Makefile.in > po/Makefile]],[[]])
758 dnl Required by html, pdf, install-pdf and install-html
759 AC_SUBST(datarootdir)
764 AC_CONFIG_FILES(Makefile po/Makefile.in:po/Make-in)