]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blob - ld/configure.ac
Add a linker warning when creating potentially dangerous executable segments. Add...
[thirdparty/binutils-gdb.git] / ld / configure.ac
1 dnl Process this file with autoconf to produce a configure script
2 dnl
3 dnl Copyright (C) 2012-2022 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
19
20 m4_include([../bfd/version.m4])
21 AC_INIT([ld], BFD_VERSION)
22 AC_CONFIG_SRCDIR(ldmain.c)
23
24 AC_CANONICAL_TARGET
25 AC_CANONICAL_BUILD
26
27 AM_INIT_AUTOMAKE
28 AM_SILENT_RULES([yes])
29 AM_MAINTAINER_MODE
30
31 AC_PROG_CC
32 AC_PROG_CXX
33 AC_PROG_GREP
34 AC_GNU_SOURCE
35 AC_USE_SYSTEM_EXTENSIONS
36 AC_PROG_INSTALL
37
38 LT_INIT
39 ACX_LARGEFILE
40
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.])
52 fi
53
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
63
64 BFD_64_BIT
65
66 AC_ARG_WITH(sysroot,
67 [ --with-sysroot[=DIR] Search for usr/lib et al within DIR.],
68 [
69 case ${with_sysroot} in
70 yes) TARGET_SYSTEM_ROOT='${exec_prefix}/${target_alias}/sys-root' ;;
71 *) TARGET_SYSTEM_ROOT=$with_sysroot ;;
72 esac
73
74 TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"$(TARGET_SYSTEM_ROOT)\"'
75 use_sysroot=yes
76
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=\"\"'
100 ])
101 AC_SUBST(use_sysroot)
102 AC_SUBST(TARGET_SYSTEM_ROOT)
103 AC_SUBST(TARGET_SYSTEM_ROOT_DEFINE)
104
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)
127
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])
136
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
152
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
164
165 # Decide setting DT_RUNPATH instead of DT_RPATH by default
166 ac_default_new_dtags=unset
167 # Provide a configure time option to override our default.
168 AC_ARG_ENABLE(new_dtags,
169 AS_HELP_STRING([--enable-new-dtags],
170 [set DT_RUNPATH instead of DT_RPATH by default])],
171 [case "${enableval}" in
172 yes) ac_default_new_dtags=1 ;;
173 no) ac_default_new_dtags=0 ;;
174 esac])dnl
175
176 # Decide if -z relro should be enabled in ELF linker by default.
177 ac_default_ld_z_relro=unset
178 # Provide a configure time option to override our default.
179 AC_ARG_ENABLE(relro,
180 AS_HELP_STRING([--enable-relro],
181 [enable -z relro in ELF linker by default]),
182 [case "${enableval}" in
183 yes) ac_default_ld_z_relro=1 ;;
184 no) ac_default_ld_z_relro=0 ;;
185 esac])dnl
186
187 # Decide if DT_TEXTREL check should be enabled in ELF linker.
188 ac_default_ld_textrel_check=unset
189 AC_ARG_ENABLE([textrel-check],
190 AC_HELP_STRING([--enable-textrel-check=@<:@yes|no|warning|error@:>@],
191 [enable DT_TEXTREL check in ELF linker]),
192 [case "${enableval}" in
193 yes|no|warning|error) ac_default_ld_textrel_check=${enableval} ;;
194 esac])
195
196 # Decide if -z separate-code should be enabled in ELF linker by default.
197 ac_default_ld_z_separate_code=unset
198 AC_ARG_ENABLE(separate-code,
199 AS_HELP_STRING([--enable-separate-code],
200 [enable -z separate-code in ELF linker by default]),
201 [case "${enableval}" in
202 yes) ac_default_ld_z_separate_code=1 ;;
203 no) ac_default_ld_z_separate_code=0 ;;
204 esac])
205
206
207 ac_default_ld_warn_execstack=unset
208 AC_ARG_ENABLE(warn-execstack,
209 AS_HELP_STRING([--enable-warn-execstack],
210 [enable warnings when creating an executable stack]),
211 [case "${enableval}" in
212 yes) ac_default_ld_warn_execstack=1 ;;
213 no) ac_default_ld_warn_execstack=-1 ;;
214 esac])
215
216 ac_default_ld_warn_rwx_segments=unset
217 AC_ARG_ENABLE(warn-rwx-segments,
218 AS_HELP_STRING([--enable-warn-rwx-segments],
219 [enable warnings when creating segements with RWX permissions]),
220 [case "${enableval}" in
221 yes) ac_default_ld_warn_rwx_segments=1 ;;
222 no) ac_default_ld_warn_rwx_segments=0 ;;
223 esac])
224
225 ac_default_ld_default_execstack=unset
226 AC_ARG_ENABLE(default-execstack,
227 AS_HELP_STRING([--enable-default-execstack],
228 [create an executable stack if an input file is missing a .note.GNU-stack section]),
229 [case "${enableval}" in
230 yes) ac_default_ld_default_execstack=1 ;;
231 no) ac_default_ld_default_execstack=0 ;;
232 esac])
233
234
235 # Decide if --error-handling-script should be supported.
236 ac_support_error_handling_script=unset
237 AC_ARG_ENABLE(error-handling-script,
238 AS_HELP_STRING([--enable-error-handling-script],
239 [enable/disable support for the --error-handling-script option]),
240 [case "${enableval}" in
241 yes) ac_support_error_handling_script=1 ;;
242 no) ac_support_error_handling_script=0 ;;
243 esac])
244
245 # Decide which "--hash-style" to use by default
246 # Provide a configure time option to override our default.
247 AC_ARG_ENABLE([default-hash-style],
248 AS_HELP_STRING([--enable-default-hash-style={sysv,gnu,both}],
249 [use this default hash style]),
250 [case "${enable_default_hash_style}" in
251 sysv | gnu | both) ;;
252 *) AC_MSG_ERROR([bad value ${enable_default_hash_style} for enable-default-hash-style option]) ;;
253 esac],
254 [case "${target}" in
255 # Enable gnu hash only on GNU targets, but not mips
256 mips*-*-*) enable_default_hash_style=sysv ;;
257 *-*-gnu* | *-*-linux* | *-*-nacl*) enable_default_hash_style=both ;;
258 *) enable_default_hash_style=sysv ;;
259 esac])
260
261 case "${enable_default_hash_style}" in
262 sysv | both) ac_default_emit_sysv_hash=1 ;;
263 *) ac_default_emit_sysv_hash=0 ;;
264 esac
265
266 case "${enable_default_hash_style}" in
267 gnu | both) ac_default_emit_gnu_hash=1 ;;
268 *) ac_default_emit_gnu_hash=0 ;;
269 esac
270
271 AC_ARG_ENABLE(initfini-array,
272 [ --disable-initfini-array do not use .init_array/.fini_array sections],
273 [case "${enableval}" in
274 yes|no) ;;
275 *) AC_MSG_ERROR([invalid --enable-initfini-array argument]) ;;
276 esac], [enable_initfini_array=yes])
277 AC_SUBST(enable_initfini_array)
278 if test $enable_initfini_array = yes; then
279 AC_DEFINE(HAVE_INITFINI_ARRAY, 1,
280 [Define .init_array/.fini_array sections are available and working.])
281 fi
282
283 GCC_ENABLE([libctf], [yes], [], [Handle .ctf type-info sections])
284 if test "${enable_libctf}" = yes; then
285 AC_DEFINE(ENABLE_LIBCTF, 1, [Handle .ctf type-info sections])
286 fi
287 AM_CONDITIONAL(ENABLE_LIBCTF, test "${enable_libctf}" = yes)
288 AC_SUBST(enable_libctf)
289
290 AM_BINUTILS_WARNINGS
291
292 AM_LC_MESSAGES
293
294 AC_CONFIG_HEADERS([config.h:config.in])
295
296 # PR 14072
297 AH_VERBATIM([00_CONFIG_H_CHECK],
298 [/* Check that config.h is #included before system headers
299 (this works only for glibc, but that should be enough). */
300 #if defined(__GLIBC__) && !defined(__FreeBSD_kernel__) && !defined(__CONFIG_H__)
301 # error config.h must be #included before system headers
302 #endif
303 #define __CONFIG_H__ 1])
304
305 if test -z "$target" ; then
306 AC_MSG_ERROR(Unrecognized target system type; please check config.sub.)
307 fi
308 if test -z "$host" ; then
309 AC_MSG_ERROR(Unrecognized host system type; please check config.sub.)
310 fi
311
312 # host-specific stuff:
313
314 ALL_LINGUAS="bg da de es fi fr ga id it ja pt_BR ru sr sv tr uk vi zh_CN zh_TW"
315 ZW_GNU_GETTEXT_SISTER_DIR
316 AM_PO_SUBDIRS
317
318 AC_EXEEXT
319
320 AC_PROG_YACC
321 AM_PROG_LEX
322
323 AM_MAINTAINER_MODE
324 AM_CONDITIONAL(GENINSRC_NEVER, false)
325 ACX_PROG_CMP_IGNORE_INITIAL
326
327 . ${srcdir}/configure.host
328
329 AC_SUBST(HDEFINES)
330 AC_SUBST(NATIVE_LIB_DIRS)
331
332 # We use headers from include/ that check various HAVE_*_H macros, thus
333 # should ensure they are set by configure. This is true even when C99
334 # guarantees they are available.
335 # sha1.h and md4.h test HAVE_LIMITS_H, HAVE_SYS_TYPES_H and HAVE_STDINT_H
336 # plugin-api.h tests HAVE_STDINT_H and HAVE_INTTYPES_H
337 # Besides those, we need to check anything used in ld/ not in C99.
338 AC_CHECK_HEADERS(fcntl.h elf-hints.h limits.h inttypes.h stdint.h \
339 sys/file.h sys/mman.h sys/param.h sys/stat.h sys/time.h \
340 sys/types.h unistd.h)
341 AC_CHECK_FUNCS(close glob lseek mkstemp open realpath sbrk waitpid)
342
343 BFD_BINARY_FOPEN
344
345 AC_CHECK_DECLS([asprintf, environ, sbrk])
346
347 AC_FUNC_MMAP
348
349 AC_SEARCH_LIBS([dlopen], [dl])
350
351 AC_MSG_CHECKING(for a known getopt prototype in unistd.h)
352 AC_CACHE_VAL(ld_cv_decl_getopt_unistd_h,
353 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <unistd.h>], [extern int getopt (int, char *const*, const char *);])],
354 ld_cv_decl_getopt_unistd_h=yes, ld_cv_decl_getopt_unistd_h=no)])
355 AC_MSG_RESULT($ld_cv_decl_getopt_unistd_h)
356 if test $ld_cv_decl_getopt_unistd_h = yes; then
357 AC_DEFINE([HAVE_DECL_GETOPT], 1,
358 [Is the prototype for getopt in <unistd.h> in the expected format?])
359 fi
360
361 # Link in zlib if we can. This allows us to read and write
362 # compressed CTF sections.
363 AM_ZLIB
364
365 # When converting linker scripts into strings for use in emulation
366 # files, use astring.sed if the compiler supports ANSI string
367 # concatenation, or ostring.sed otherwise. This is to support the
368 # broken Microsoft MSVC compiler, which limits the length of string
369 # constants, while still supporting pre-ANSI compilers which do not
370 # support string concatenation.
371 AC_MSG_CHECKING([whether ANSI C string concatenation works])
372 AC_CACHE_VAL(ld_cv_string_concatenation,
373 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [char *a = "a" "a";])],
374 ld_cv_string_concatenation=yes,
375 ld_cv_string_concatenation=no)])
376 AC_MSG_RESULT($ld_cv_string_concatenation)
377 if test "$ld_cv_string_concatenation" = "yes"; then
378 STRINGIFY=astring.sed
379 else
380 STRINGIFY=ostring.sed
381 fi
382 AC_SUBST(STRINGIFY)
383
384 # target-specific stuff:
385
386 all_targets=
387 EMUL=
388 all_emuls=
389 all_emul_extras=
390 all_libpath=
391 TDIRS=
392
393 elf_list_options=false
394 elf_shlib_list_options=false
395 elf_plt_unwind_list_options=false
396 for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'`
397 do
398 if test "$targ_alias" = "all"; then
399 all_targets=true
400 elf_list_options=true
401 elf_shlib_list_options=true
402 elf_plt_unwind_list_options=true
403 else
404 # Canonicalize the secondary target names.
405 result=`$ac_config_sub $targ_alias 2>/dev/null`
406 if test -n "$result"; then
407 targ=$result
408 else
409 targ=$targ_alias
410 fi
411
412 . ${srcdir}/configure.tgt
413
414 if test "$targ" = "$target"; then
415 EMUL=$targ_emul
416 fi
417
418 if test x${enable_64_bit_bfd} = xno; then
419 . ${srcdir}/../bfd/config.bfd
420 fi
421
422 if test x${enable_64_bit_bfd} = xyes; then
423 targ_extra_emuls="$targ_extra_emuls $targ64_extra_emuls"
424 targ_extra_libpath="$targ_extra_libpath $targ64_extra_libpath"
425 fi
426
427 for i in $targ_emul $targ_extra_emuls $targ_extra_libpath; do
428 case " $all_emuls " in
429 *" e${i}.o "*) ;;
430 *)
431 all_emuls="$all_emuls e${i}.o"
432 eval result=\$tdir_$i
433 test -z "$result" && result=$targ_alias
434 TDIRS="$TDIRS
435 tdir_$i=$result"
436 case "${i}" in
437 *elf*)
438 elf_list_options=true
439 ;;
440 *)
441 if $GREP "TEMPLATE_NAME=elf" ${srcdir}/emulparams/${i}.sh >/dev/null 2>/dev/null; then
442 elf_list_options=true
443 fi
444 ;;
445 esac
446 if test "$elf_list_options" = "true"; then
447 source_sh()
448 {
449 . $1
450 }
451 source_sh ${srcdir}/emulparams/${i}.sh
452 if test x${GENERATE_SHLIB_SCRIPT} = xyes; then
453 elf_shlib_list_options=true
454 fi
455 if test x${PLT_UNWIND} = xyes; then
456 elf_plt_unwind_list_options=true
457 fi
458 fi
459 ;;
460 esac
461 done
462
463 for i in $targ_emul $targ_extra_libpath; do
464 case " $all_libpath " in
465 *" ${i} "*) ;;
466 *)
467 if test -z "$all_libpath"; then
468 all_libpath=${i}
469 else
470 all_libpath="$all_libpath ${i}"
471 fi
472 ;;
473 esac
474 done
475
476 for i in $targ_extra_ofiles; do
477 case " $all_emul_extras " in
478 *" ${i} "*) ;;
479 *)
480 all_emul_extras="$all_emul_extras ${i}"
481 ;;
482 esac
483 done
484
485 fi
486 done
487
488 if test x$ac_default_compressed_debug_sections = xyes ; then
489 AC_DEFINE(DEFAULT_FLAG_COMPRESS_DEBUG, 1, [Define if you want compressed debug sections by default.])
490 fi
491
492 if test "${ac_default_new_dtags}" = unset; then
493 ac_default_new_dtags=0
494 fi
495 AC_DEFINE_UNQUOTED(DEFAULT_NEW_DTAGS,
496 $ac_default_new_dtags,
497 [Define to 1 if you want to set DT_RUNPATH instead of DT_RPATH by default.])
498
499 if test "${ac_default_ld_z_relro}" = unset; then
500 ac_default_ld_z_relro=0
501 fi
502 AC_DEFINE_UNQUOTED(DEFAULT_LD_Z_RELRO,
503 $ac_default_ld_z_relro,
504 [Define to 1 if you want to enable -z relro in ELF linker by default.])
505
506 ac_default_ld_textrel_check_warning=0
507 case "${ac_default_ld_textrel_check}" in
508 unset|no)
509 ac_default_ld_textrel_check=textrel_check_none
510 ;;
511 yes|warning)
512 ac_default_ld_textrel_check=textrel_check_warning
513 ac_default_ld_textrel_check_warning=1
514 ;;
515 error)
516 ac_default_ld_textrel_check=textrel_check_error
517 ;;
518 esac
519 AC_DEFINE_UNQUOTED(DEFAULT_LD_TEXTREL_CHECK,
520 $ac_default_ld_textrel_check,
521 [The default method for DT_TEXTREL check in ELF linker.])
522 AC_DEFINE_UNQUOTED(DEFAULT_LD_TEXTREL_CHECK_WARNING,
523 $ac_default_ld_textrel_check_warning,
524 [Define to 1 if DT_TEXTREL check is warning in ELF linker by default.])
525
526 if test "${ac_default_ld_z_separate_code}" = unset; then
527 ac_default_ld_z_separate_code=0
528 fi
529 AC_DEFINE_UNQUOTED(DEFAULT_LD_Z_SEPARATE_CODE,
530 $ac_default_ld_z_separate_code,
531 [Define to 1 if you want to enable -z separate-code in ELF linker by default.])
532
533
534 if test "${ac_default_ld_warn_execstack}" = unset; then
535 ac_default_ld_warn_execstack=0
536 fi
537 AC_DEFINE_UNQUOTED(DEFAULT_LD_WARN_EXECSTACK,
538 $ac_default_ld_warn_execstack,
539 [Define to 1 if you want to enable --warn-execstack in ELF linker by default.])
540
541 if test "${ac_default_ld_warn_rwx_segments}" = unset; then
542 ac_default_ld_warn_rwx_segments=1
543 fi
544 AC_DEFINE_UNQUOTED(DEFAULT_LD_WARN_RWX_SEGMENTS,
545 $ac_default_ld_warn_rwx_segments,
546 [Define to 0 if you want to disable --warn-rwx-segments in ELF linker by default.])
547
548 if test "${ac_default_ld_default_execstack}" = unset; then
549 ac_default_ld_default_execstack=1
550 fi
551 AC_DEFINE_UNQUOTED(DEFAULT_LD_EXECSTACK,
552 $ac_default_ld_default_execstack,
553 [Define to 0 if you want to disable the generation of an executable stack when a .note-GNU-stack section is missing.])
554
555
556 if test "${ac_support_error_handling_script}" = unset; then
557 ac_support_error_handling_script=1
558 fi
559 AC_DEFINE_UNQUOTED(SUPPORT_ERROR_HANDLING_SCRIPT,
560 $ac_support_error_handling_script,
561 [Define to 1 if you want to support the --error-handling-script command line option.])
562
563 AC_DEFINE_UNQUOTED([DEFAULT_EMIT_SYSV_HASH],
564 [$ac_default_emit_sysv_hash],
565 [Define to 1 if you want to emit sysv hash in the ELF linker by default.])
566
567 AC_DEFINE_UNQUOTED([DEFAULT_EMIT_GNU_HASH],
568 [$ac_default_emit_gnu_hash],
569 [Define to 1 if you want to emit gnu hash in the ELF linker by default.])
570
571 AC_SUBST(elf_list_options)
572 AC_SUBST(elf_shlib_list_options)
573 AC_SUBST(elf_plt_unwind_list_options)
574 AC_SUBST(EMUL)
575
576 AC_SUBST(TDIRS)
577 AM_SUBST_NOTMAKE(TDIRS)
578
579 if test x${all_targets} = xtrue; then
580 if test x${enable_64_bit_bfd} = xyes; then
581 EMULATION_OFILES='$(ALL_EMULATIONS) $(ALL_64_EMULATIONS)'
582 EMUL_EXTRA_OFILES='$(ALL_EMUL_EXTRA_OFILES) $(ALL_64_EMUL_EXTRA_OFILES)'
583 else
584 EMULATION_OFILES='$(ALL_EMULATIONS)'
585 EMUL_EXTRA_OFILES='$(ALL_EMUL_EXTRA_OFILES)'
586 fi
587 else
588 EMULATION_OFILES=$all_emuls
589 EMUL_EXTRA_OFILES=$all_emul_extras
590 fi
591 AC_SUBST(EMULATION_OFILES)
592 AC_SUBST(EMUL_EXTRA_OFILES)
593 AC_SUBST(LIB_PATH)
594
595 EMULATION_LIBPATH=$all_libpath
596 AC_SUBST(EMULATION_LIBPATH)
597
598 if test x${enable_static} = xno; then
599 TESTBFDLIB="-Wl,--rpath,../bfd/.libs ../bfd/.libs/libbfd.so"
600 TESTCTFLIB="-Wl,--rpath,../libctf/.libs ../libctf/.libs/libctf.so"
601 else
602 TESTBFDLIB="../bfd/.libs/libbfd.a"
603 TESTCTFLIB="../libctf/.libs/libctf.a"
604 fi
605 if test "${enable_libctf}" = no; then
606 TESTCTFLIB=
607 fi
608 AC_SUBST(TESTBFDLIB)
609 AC_SUBST(TESTCTFLIB)
610
611 target_vendor=${target_vendor=$host_vendor}
612 case "$target_vendor" in
613 hp) EXTRA_SHLIB_EXTENSION=".sl" ;;
614 *) EXTRA_SHLIB_EXTENSION= ;;
615 esac
616
617 case "$target_os" in
618 lynxos) EXTRA_SHLIB_EXTENSION=".a" ;;
619 esac
620
621 if test x${EXTRA_SHLIB_EXTENSION} != x ; then
622 AC_DEFINE_UNQUOTED(EXTRA_SHLIB_EXTENSION, "$EXTRA_SHLIB_EXTENSION",
623 [Additional extension a shared object might have.])
624 fi
625
626 AC_CONFIG_COMMANDS([default],
627 [[
628 case "$srcdir" in
629 .) srcdirpre= ;;
630 *) srcdirpre='$(srcdir)/' ;;
631 esac
632 POFILES=
633 GMOFILES=
634 for lang in dummy $OBSOLETE_ALL_LINGUAS; do
635 if test $lang != dummy; then
636 POFILES="$POFILES $srcdirpre$lang.po"
637 GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
638 fi
639 done
640 sed -e '/^SRC-POTFILES =/r po/SRC-POTFILES' \
641 -e '/^BLD-POTFILES =/r po/BLD-POTFILES' \
642 -e "s,@POFILES@,$POFILES," \
643 -e "s,@GMOFILES@,$GMOFILES," \
644 po/Makefile.in > po/Makefile]],[[]])
645
646 dnl Required by html, pdf, install-pdf and install-html
647 AC_SUBST(datarootdir)
648 AC_SUBST(docdir)
649 AC_SUBST(htmldir)
650 AC_SUBST(pdfdir)
651
652 AC_CONFIG_FILES(Makefile po/Makefile.in:po/Make-in)
653 AC_OUTPUT
654
655 GNU_MAKE_JOBSERVER