configure.ac 17 KB

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