Updated Malay translation for the bfd sub-directory
[binutils-gdb.git] / ld / configure.ac
blob004fa31d877263f2846f02c79aebc6e5d77d83d7
1 dnl Process this file with autoconf to produce a configure script
2 dnl
3 dnl   Copyright (C) 2012-2025 Free Software Foundation, Inc.
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.
9 dnl
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.
14 dnl
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
20 m4_include([../bfd/version.m4])
21 AC_INIT([ld], [BFD_VERSION])
22 AC_CONFIG_SRCDIR(ldmain.c)
24 AC_CANONICAL_TARGET
25 AC_CANONICAL_BUILD
27 AM_INIT_AUTOMAKE
28 AM_SILENT_RULES([yes])
29 AM_MAINTAINER_MODE
31 AC_PROG_CC
32 AC_PROG_CXX
33 AC_PROG_GREP
34 AC_USE_SYSTEM_EXTENSIONS
35 AC_PROG_INSTALL
36 PKG_PROG_PKG_CONFIG
38 LT_INIT
39 ACX_LARGEFILE
41 ac_checking=
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= ;;
48   *)        ac_checking=yes ;;
49 esac])dnl
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')
59             ;;
60   no)       enable_targets= ;;
61   *)        enable_targets=$enableval ;;
62 esac])dnl
64 BFD_64_BIT
66 AC_ARG_WITH(sysroot,
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 ;;
72  esac
74  TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"$(TARGET_SYSTEM_ROOT)\"'
75  use_sysroot=yes
77  if test "x$prefix" = xNONE; then
78   test_prefix=/usr/local
79  else
80   test_prefix=$prefix
81  fi
82  if test "x$exec_prefix" = xNONE; then
83   test_exec_prefix=$test_prefix
84  else
85   test_exec_prefix=$exec_prefix
86  fi
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"
94    ;;
95  esac
96 ], [
97  use_sysroot=no
98  TARGET_SYSTEM_ROOT=
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.
108 AC_ARG_ENABLE(gold,
109 [[  --enable-gold[=ARG]     build gold [ARG={default,yes,no}]]],
110 [case "${enableval}" in
111  default)
112    install_as_default=no
113    installed_linker=ld.bfd
114    ;;
115  yes|no)
116    install_as_default=yes
117    installed_linker=ld.bfd
118    ;;
119  *)
120    AC_MSG_ERROR([invalid --enable-gold argument])
121    ;;
122  esac],
123 [install_as_default=yes
124  installed_linker=ld.bfd])
125 AC_SUBST(install_as_default)
126 AC_SUBST(installed_linker)
128 AC_ARG_ENABLE([got],
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) ;;
134 esac],
135 [got_handling=target])
137 case "${got_handling}" in
138   target)
139     AC_DEFINE([GOT_HANDLING_DEFAULT], [GOT_HANDLING_TARGET_DEFAULT],
140               [Define to choose default GOT handling scheme]) ;;
141   single)
142     AC_DEFINE([GOT_HANDLING_DEFAULT], [GOT_HANDLING_SINGLE],
143               [Define to choose default GOT handling scheme]) ;;
144   negative)
145     AC_DEFINE([GOT_HANDLING_DEFAULT], [GOT_HANDLING_NEGATIVE],
146               [Define to choose default GOT handling scheme]) ;;
147   multigot)
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) ;;
151 esac
153 # PR gas/19109
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 ;;
163 esac])dnl
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 ;;
172 esac])dnl
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 ;;
183 esac])dnl
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.
188 AC_ARG_ENABLE(relro,
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 ;;
194 esac])dnl
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} ;;
203 esac])
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 ;;
213 esac])
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 ;;
223 esac])
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 ;;
233 esac])
236 # By default warn when an executable stack is created due to object files
237 # requesting such, not when the user specifies -z execstack.
238 ac_default_ld_warn_execstack=2
239 AC_ARG_ENABLE(warn-execstack,
240               AS_HELP_STRING([--enable-warn-execstack],
241               [enable warnings when creating an executable stack]),
242 [case "${enableval}" in
243   yes) ac_default_ld_warn_execstack=1 ;;
244   no)  ac_default_ld_warn_execstack=0 ;;
245 esac])
247 ac_default_ld_error_execstack=0
248 AC_ARG_ENABLE(error-execstack,
249               AS_HELP_STRING([--enable-error-execstack],
250               [turn executable stack warnings into errors]),
251 [case "${enableval}" in
252   yes) ac_default_ld_error_execstack=1 ;;
253   no)  ac_default_ld_error_execstack=0 ;;
254 esac])
256 ac_default_ld_warn_rwx_segments=unset
257 AC_ARG_ENABLE(warn-rwx-segments,
258               AS_HELP_STRING([--enable-warn-rwx-segments],
259               [enable warnings when creating segments with RWX permissions]),
260 [case "${enableval}" in
261   yes) ac_default_ld_warn_rwx_segments=1 ;;
262   no)  ac_default_ld_warn_rwx_segments=0 ;;
263 esac])
265 ac_default_ld_error_rwx_segments=0
266 AC_ARG_ENABLE(error-rwx-segments,
267               AS_HELP_STRING([--enable-error-rwx-segments],
268               [turn executable segment warnings into errors]),
269 [case "${enableval}" in
270   yes) ac_default_ld_error_rwx_segments=1 ;;
271   no)  ac_default_ld_error_rwx_segments=0 ;;
272 esac])
274 ac_default_ld_default_execstack=unset
275 AC_ARG_ENABLE(default-execstack,
276               AS_HELP_STRING([--enable-default-execstack],
277               [create an executable stack if an input file is missing a .note.GNU-stack section]),
278 [case "${enableval}" in
279   yes) ac_default_ld_default_execstack=1 ;;
280   no)  ac_default_ld_default_execstack=0 ;;
281 esac])
284 # Decide if --error-handling-script should be supported.
285 ac_support_error_handling_script=unset
286 AC_ARG_ENABLE(error-handling-script,
287               AS_HELP_STRING([--enable-error-handling-script],
288               [enable/disable support for the --error-handling-script option]),
289 [case "${enableval}" in
290   yes) ac_support_error_handling_script=1 ;;
291   no)  ac_support_error_handling_script=0 ;;
292 esac])
294 # Decide which "--hash-style" to use by default
295 # Provide a configure time option to override our default.
296 AC_ARG_ENABLE([default-hash-style],
297 AS_HELP_STRING([--enable-default-hash-style={sysv,gnu,both}],
298                [use this default hash style]),
299 [case "${enable_default_hash_style}" in
300   sysv | gnu | both) ;;
301   *) AC_MSG_ERROR([bad value ${enable_default_hash_style} for enable-default-hash-style option]) ;;
302 esac],
303 [case "${target}" in
304   # Enable gnu hash only on GNU targets, but not mips
305   mips*-*-*) enable_default_hash_style=sysv ;;
306   *-*-gnu* | *-*-linux* | *-*-nacl*) enable_default_hash_style=both ;;
307   *) enable_default_hash_style=sysv ;;
308 esac])
310 case "${enable_default_hash_style}" in
311   sysv | both) ac_default_emit_sysv_hash=1 ;;
312   *) ac_default_emit_sysv_hash=0 ;;
313 esac
315 case "${enable_default_hash_style}" in
316   gnu | both) ac_default_emit_gnu_hash=1 ;;
317   *) ac_default_emit_gnu_hash=0 ;;
318 esac
320 AC_ARG_ENABLE(initfini-array,
321 [  --disable-initfini-array do not use .init_array/.fini_array sections],
322 [case "${enableval}" in
323  yes|no) ;;
324  *) AC_MSG_ERROR([invalid --enable-initfini-array argument]) ;;
325  esac], [enable_initfini_array=yes])
326 AC_SUBST(enable_initfini_array)
327 if test $enable_initfini_array = yes; then
328   AC_DEFINE(HAVE_INITFINI_ARRAY, 1,
329     [Define .init_array/.fini_array sections are available and working.])
332 GCC_ENABLE([libctf], [yes], [], [Handle .ctf type-info sections])
333 if test "${enable_libctf}" = yes; then
334     AC_DEFINE(ENABLE_LIBCTF, 1, [Handle .ctf type-info sections])
336 AM_CONDITIONAL(ENABLE_LIBCTF, test "${enable_libctf}" = yes)
337 AC_SUBST(enable_libctf)
339 # Used to validate --package-metadata= input. Disabled by default.
340 AC_ARG_ENABLE([jansson],
341   [AS_HELP_STRING([--enable-jansson],
342     [enable jansson [default=no]])],
343   [enable_jansson=$enableval],
344   [enable_jansson="no"])
346 AS_IF([test "x$enable_jansson" != "xno"],
347   [PKG_CHECK_MODULES(JANSSON, [jansson],
348     [
349       AC_DEFINE(HAVE_JANSSON, 1, [The jansson library is to be used])
350       AC_SUBST([JANSSON_CFLAGS])
351       AC_SUBST([JANSSON_LIBS])
352     ],
353     [AC_MSG_ERROR([Cannot find jansson library])])
354   ])
356 AM_BINUTILS_WARNINGS
358 AM_LC_MESSAGES
360 AC_CONFIG_HEADERS([config.h:config.in])
362 # PR 14072
363 AH_VERBATIM([00_CONFIG_H_CHECK],
364 [/* Check that config.h is #included before system headers
365    (this works only for glibc, but that should be enough).  */
366 #if defined(__GLIBC__) && !defined(__FreeBSD_kernel__) && !defined(__CONFIG_H__)
367 #  error config.h must be #included before system headers
368 #endif
369 #define __CONFIG_H__ 1])
371 if test -z "$target" ; then
372     AC_MSG_ERROR(Unrecognized target system type; please check config.sub.)
374 if test -z "$host" ; then
375     AC_MSG_ERROR(Unrecognized host system type; please check config.sub.)
378 # host-specific stuff:
380 ALL_LINGUAS="bg da de es fi fr ga id it ja pt_BR ru sr sv tr uk vi zh_CN zh_TW"
381 ZW_GNU_GETTEXT_SISTER_DIR
382 AM_PO_SUBDIRS
384 AC_EXEEXT
386 AC_PROG_YACC
387 AM_PROG_LEX
389 AM_MAINTAINER_MODE
390 AM_CONDITIONAL(GENINSRC_NEVER, false)
391 ACX_PROG_CMP_IGNORE_INITIAL
393 . ${srcdir}/configure.host
395 AC_SUBST(HDEFINES)
396 AC_SUBST(NATIVE_LIB_DIRS)
398 # We use headers from include/ that check various HAVE_*_H macros, thus
399 # should ensure they are set by configure.  This is true even when C99
400 # guarantees they are available.
401 # sha1.h and md4.h test HAVE_LIMITS_H, HAVE_SYS_TYPES_H and HAVE_STDINT_H
402 # plugin-api.h tests HAVE_STDINT_H and HAVE_INTTYPES_H
403 # Besides those, we need to check anything used in ld/ not in C99.
404 AC_CHECK_HEADERS(fcntl.h elf-hints.h limits.h inttypes.h stdint.h \
405                  sys/file.h sys/mman.h sys/param.h sys/stat.h sys/time.h \
406                  sys/types.h unistd.h)
407 AC_CHECK_FUNCS(close glob lseek mkstemp open realpath waitpid)
409 BFD_BINARY_FOPEN
411 AC_CHECK_DECLS([environ, stpcpy])
413 GCC_AC_FUNC_MMAP
415 AC_SEARCH_LIBS([dlopen], [dl])
417 AC_MSG_CHECKING(for a known getopt prototype in unistd.h)
418 AC_CACHE_VAL(ld_cv_decl_getopt_unistd_h,
419 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <unistd.h>], [extern int getopt (int, char *const*, const char *);])],
420 ld_cv_decl_getopt_unistd_h=yes, ld_cv_decl_getopt_unistd_h=no)])
421 AC_MSG_RESULT($ld_cv_decl_getopt_unistd_h)
422 if test $ld_cv_decl_getopt_unistd_h = yes; then
423   AC_DEFINE([HAVE_DECL_GETOPT], 1,
424             [Is the prototype for getopt in <unistd.h> in the expected format?])
427 dnl xxhash support from gdbsupport/common.m4
428 AC_MSG_CHECKING([whether to use xxhash])
429 AC_ARG_WITH(xxhash,
430   AS_HELP_STRING([--with-xxhash], [use inlined libxxhash for hashing (faster) (auto/yes/no)]),
431   [], [with_xxhash=auto])
432 if test "x$with_xxhash" != "xno"; then
433   AC_COMPILE_IFELSE([AC_LANG_SOURCE([
434 #define XXH_INLINE_ALL
435 #include <xxhash.h>
436 XXH128_hash_t r;
437 void foo (void) { r = XXH128("foo", 3, 0); }
438 ])],[
439   with_xxhash=yes
440   AC_DEFINE([WITH_XXHASH], 1, [whether to use inline xxhash])
442   if test "$with_xxhash" = yes; then
443     AC_MSG_ERROR([xxhash is missing or unusable])
444   fi
445   with_xxhash=no])
447 AC_MSG_RESULT([$with_xxhash])
449 # Link in zlib/zstd if we can.  This allows us to read and write
450 # compressed debug sections.
451 AM_ZLIB
452 AC_ZSTD
454 # target-specific stuff:
456 all_targets=
457 EMUL=
458 all_emuls=
459 all_emul_extras=
460 all_libpath=
461 TDIRS=
463 elf_list_options=false
464 elf_shlib_list_options=false
465 elf_plt_unwind_list_options=false
466 for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'`
468   if test "$targ_alias" = "all"; then
469     all_targets=true
470     elf_list_options=true
471     elf_shlib_list_options=true
472     elf_plt_unwind_list_options=true
473   else
474     # Canonicalize the secondary target names.
475     result=`$ac_config_sub $targ_alias 2>/dev/null`
476     if test -n "$result"; then
477         targ=$result
478     else
479         targ=$targ_alias
480     fi
482     . ${srcdir}/configure.tgt
484     if test "$targ" = "$target"; then
485       EMUL=$targ_emul
486     fi
488     if test x${enable_64_bit_bfd} = xno; then
489       . ${srcdir}/../bfd/config.bfd
490     fi
492     if test x${enable_64_bit_bfd} = xyes; then
493       targ_extra_emuls="$targ_extra_emuls $targ64_extra_emuls"
494       targ_extra_libpath="$targ_extra_libpath $targ64_extra_libpath"
495     fi
497     for i in $targ_emul $targ_extra_emuls $targ_extra_libpath; do
498         case " $all_emuls " in
499         *" e${i}.o "*) ;;
500         *)
501           all_emuls="$all_emuls e${i}.o"
502           eval result=\$tdir_$i
503           test -z "$result" && result=$targ_alias
504           TDIRS="$TDIRS
505 tdir_$i=$result"
506           case "${i}" in
507           *elf*)
508             elf_list_options=true
509             ;;
510           *)
511             if $GREP "TEMPLATE_NAME=elf" ${srcdir}/emulparams/${i}.sh >/dev/null 2>/dev/null; then
512               elf_list_options=true
513             fi
514             ;;
515           esac
516           if test "$elf_list_options" = "true"; then
517             source_sh()
518             {
519               . $1
520             }
521             source_sh ${srcdir}/emulparams/${i}.sh
522             if test x${GENERATE_SHLIB_SCRIPT} = xyes; then
523               elf_shlib_list_options=true
524             fi
525             if test x${PLT_UNWIND} = xyes; then
526               elf_plt_unwind_list_options=true
527             fi
528           fi
529           ;;
530         esac
531     done
533     for i in $targ_emul $targ_extra_libpath; do
534         case " $all_libpath " in
535         *" ${i} "*) ;;
536         *)
537           if test -z "$all_libpath"; then
538             all_libpath=${i}
539           else
540             all_libpath="$all_libpath ${i}"
541           fi
542           ;;
543         esac
544     done
546     for i in $targ_extra_ofiles; do
547         case " $all_emul_extras " in
548         *" ${i} "*) ;;
549         *)
550           all_emul_extras="$all_emul_extras ${i}"
551           ;;
552         esac
553     done
555   fi
556 done
558 if test x$ac_default_compressed_debug_sections = xyes ; then
559   AC_DEFINE(DEFAULT_FLAG_COMPRESS_DEBUG, 1, [Define if you want compressed debug sections by default.])
562 AC_DEFINE_UNQUOTED(DEFAULT_COMPRESSED_DEBUG_ALGORITHM, $ac_default_compressed_debug_sections_algorithm,
563                    [Default compression algorithm for --enable-compressed-debug-sections.])
565 if test "${ac_default_new_dtags}" = unset; then
566   ac_default_new_dtags=0
568 AC_DEFINE_UNQUOTED(DEFAULT_NEW_DTAGS,
569   $ac_default_new_dtags,
570   [Define to 1 if you want to set DT_RUNPATH instead of DT_RPATH by default.])
572 if test "${ac_default_ld_z_relro}" = unset; then
573   ac_default_ld_z_relro=0
575 AC_DEFINE_UNQUOTED(DEFAULT_LD_Z_RELRO,
576   $ac_default_ld_z_relro,
577   [Define to 1 if you want to enable -z relro in ELF linker by default.])
579 ac_default_ld_textrel_check_warning=0
580 case "${ac_default_ld_textrel_check}" in
581   unset|no)
582     ac_default_ld_textrel_check=textrel_check_none
583     ;;
584   yes|warning)
585     ac_default_ld_textrel_check=textrel_check_warning
586     ac_default_ld_textrel_check_warning=1
587     ;;
588   error)
589     ac_default_ld_textrel_check=textrel_check_error
590     ;;
591 esac
592 AC_DEFINE_UNQUOTED(DEFAULT_LD_TEXTREL_CHECK,
593   $ac_default_ld_textrel_check,
594   [The default method for DT_TEXTREL check in ELF linker.])
595 AC_DEFINE_UNQUOTED(DEFAULT_LD_TEXTREL_CHECK_WARNING,
596   $ac_default_ld_textrel_check_warning,
597   [Define to 1 if DT_TEXTREL check is warning in ELF linker by default.])
599 if test "${ac_default_ld_z_separate_code}" = unset; then
600   ac_default_ld_z_separate_code=0
602 AC_DEFINE_UNQUOTED(DEFAULT_LD_Z_SEPARATE_CODE,
603   $ac_default_ld_z_separate_code,
604   [Define to 1 if you want to enable -z separate-code in ELF linker by default.])
606 if test "${ac_default_ld_rosegment}" = unset; then
607   ac_default_ld_rosegment=0
609 AC_DEFINE_UNQUOTED(DEFAULT_LD_ROSEGMENT,
610   $ac_default_ld_rosegment,
611   [Define to 1 if you want to enable --rosegment in the ELF linker by default.])
613 if test "${ac_default_ld_z_mark_plt}" = unset; then
614   ac_default_ld_z_mark_plt=0
616 AC_DEFINE_UNQUOTED(DEFAULT_LD_Z_MARK_PLT,
617   $ac_default_ld_z_mark_plt,
618   [Define to 1 if you want to enable -z mark-plt in ELF x86-64 linker by default.])
621 AC_DEFINE_UNQUOTED(DEFAULT_LD_WARN_EXECSTACK,
622   $ac_default_ld_warn_execstack,
623   [Define to 1 if you want to enable --warn-execstack in ELF linker by default.])
625 AC_DEFINE_UNQUOTED(DEFAULT_LD_ERROR_EXECSTACK,
626   $ac_default_ld_error_execstack,
627   [Define to 1 if you want to turn executable stack warnings into errors by default.])
629 if test "${ac_default_ld_warn_rwx_segments}" = unset; then
630   ac_default_ld_warn_rwx_segments=1
632 AC_DEFINE_UNQUOTED(DEFAULT_LD_WARN_RWX_SEGMENTS,
633   $ac_default_ld_warn_rwx_segments,
634   [Define to 0 if you want to disable --warn-rwx-segments in ELF linker by default.])
636 AC_DEFINE_UNQUOTED(DEFAULT_LD_ERROR_RWX_SEGMENTS,
637   $ac_default_ld_error_rwx_segments,
638   [Define to 1 if you want to turn executable segment warnings into errors by default.])
640 if test "${ac_default_ld_default_execstack}" = unset; then
641   ac_default_ld_default_execstack=1
643 AC_DEFINE_UNQUOTED(DEFAULT_LD_EXECSTACK,
644   $ac_default_ld_default_execstack,
645   [Define to 0 if you want to disable the generation of an executable stack when a .note-GNU-stack section is missing.])
648 if test "${ac_support_error_handling_script}" = unset; then
649   ac_support_error_handling_script=1
651 AC_DEFINE_UNQUOTED(SUPPORT_ERROR_HANDLING_SCRIPT,
652   $ac_support_error_handling_script,
653   [Define to 1 if you want to support the --error-handling-script command line option.])
655 AC_DEFINE_UNQUOTED([DEFAULT_EMIT_SYSV_HASH],
656   [$ac_default_emit_sysv_hash],
657   [Define to 1 if you want to emit sysv hash in the ELF linker by default.])
659 AC_DEFINE_UNQUOTED([DEFAULT_EMIT_GNU_HASH],
660   [$ac_default_emit_gnu_hash],
661   [Define to 1 if you want to emit gnu hash in the ELF linker by default.])
663 AC_SUBST(elf_list_options)
664 AC_SUBST(elf_shlib_list_options)
665 AC_SUBST(elf_plt_unwind_list_options)
666 AC_SUBST(EMUL)
668 AC_SUBST(TDIRS)
669 AM_SUBST_NOTMAKE(TDIRS)
671 if test x${all_targets} = xtrue; then
672   if test x${enable_64_bit_bfd} = xyes; then
673     EMULATION_OFILES='$(ALL_EMULATIONS) $(ALL_64_EMULATIONS)'
674     EMUL_EXTRA_OFILES='$(ALL_EMUL_EXTRA_OFILES) $(ALL_64_EMUL_EXTRA_OFILES)'
675   else
676     EMULATION_OFILES='$(ALL_EMULATIONS)'
677     EMUL_EXTRA_OFILES='$(ALL_EMUL_EXTRA_OFILES)'
678   fi
679 else
680   EMULATION_OFILES=$all_emuls
681   EMUL_EXTRA_OFILES=$all_emul_extras
683 AC_SUBST(EMULATION_OFILES)
684 AC_SUBST(EMUL_EXTRA_OFILES)
685 AC_SUBST(LIB_PATH)
687 EMULATION_LIBPATH=$all_libpath
688 AC_SUBST(EMULATION_LIBPATH)
690 if test x${enable_static} = xno; then
691   TESTBFDLIB="-Wl,--rpath,../bfd/.libs ../bfd/.libs/libbfd.so"
692   TESTCTFLIB="-Wl,--rpath,../libctf/.libs ../libctf/.libs/libctf.so"
693   TESTSFRAMELIB="-Wl,--rpath,../libsframe/.libs ../libsframe/.libs/libsframe.so"
694 else
695   TESTBFDLIB="../bfd/.libs/libbfd.a"
696   TESTCTFLIB="../libctf/.libs/libctf.a"
697   TESTSFRAMELIB="../libsframe/.libs/libsframe.a"
699 if test "${enable_libctf}" = no; then
700     TESTCTFLIB=
702 AC_SUBST(TESTBFDLIB)
703 AC_SUBST(TESTCTFLIB)
704 AC_SUBST(TESTSFRAMELIB)
706 target_vendor=${target_vendor=$host_vendor}
707 case "$target_vendor" in
708   hp) EXTRA_SHLIB_EXTENSION=".sl" ;;
709   *)  EXTRA_SHLIB_EXTENSION= ;;
710 esac
712 case "$target_os" in
713   lynxos) EXTRA_SHLIB_EXTENSION=".a" ;;
714 esac
716 if test x${EXTRA_SHLIB_EXTENSION} != x ; then
717   AC_DEFINE_UNQUOTED(EXTRA_SHLIB_EXTENSION, "$EXTRA_SHLIB_EXTENSION",
718    [Additional extension a shared object might have.])
721 AC_CONFIG_COMMANDS([default],
723 case "$srcdir" in
724   .) srcdirpre= ;;
725   *) srcdirpre='$(srcdir)/' ;;
726 esac
727 POFILES=
728 GMOFILES=
729 for lang in dummy $OBSOLETE_ALL_LINGUAS; do
730   if test $lang != dummy; then
731     POFILES="$POFILES $srcdirpre$lang.po"
732     GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
733   fi
734 done
735 sed -e '/^SRC-POTFILES =/r po/SRC-POTFILES' \
736     -e '/^BLD-POTFILES =/r po/BLD-POTFILES' \
737     -e "s,@POFILES@,$POFILES," \
738     -e "s,@GMOFILES@,$GMOFILES," \
739     po/Makefile.in > po/Makefile]],[[]])
741 dnl Required by html, pdf, install-pdf and install-html
742 AC_SUBST(datarootdir)
743 AC_SUBST(docdir)
744 AC_SUBST(htmldir)
745 AC_SUBST(pdfdir)
747 AC_CONFIG_FILES(Makefile po/Makefile.in:po/Make-in)
748 AC_OUTPUT
750 GNU_MAKE_JOBSERVER