Deleted Added
sdiff udiff text old ( 33973 ) new ( 38891 )
full compact
1dnl Process this file with autoconf to produce a configure script.
2dnl
3dnl And be careful when changing it! If you must add tests with square
4dnl brackets, be sure changequote invocations surround it.
5dnl
6dnl
7AC_PREREQ(2.5)dnl v2.5 needed for --bindir et al
8AC_INIT(as.h)dnl
9dnl
10user_bfd_gas=
11AC_ARG_ENABLE(bfd-assembler,
12[ --enable-bfd-assembler use BFD back end for writing object files],
13[case "${enableval}" in
14 yes) need_bfd=yes user_bfd_gas=yes ;;
15 no) user_bfd_gas=no ;;
16 *) AC_MSG_ERROR(bad value ${enableval} given for bfd-assembler option) ;;
17esac])dnl
18AC_ARG_ENABLE(targets,
19[ targets alternative target configurations besides the primary],
20[case "${enableval}" in
21 yes | "") AC_ERROR(enable-targets option must specify target names or 'all')
22 ;;
23 no) enable_targets= ;;
24 *) enable_targets=$enableval ;;
25esac])dnl
26AC_ARG_ENABLE(shared,
27[ --enable-shared build shared BFD library],
28[case "${enableval}" in
29 yes) shared=true shared_bfd=true shared_opcodes=true ;;
30 no) shared=false ;;
31 *bfd*opcodes*) shared=true shared_bfd=true shared_opcodes=true ;;
32 *opcodes*bfd*) shared=true shared_bfd=true shared_opcodes=true ;;
33 *bfd*) shared=true shared_bfd=true ;;
34 *opcodes*) shared=true shared_opcodes=true ;;
35 *) shared=false ;;
36esac])dnl
37AC_ARG_ENABLE(commonbfdlib,
38[ --enable-commonbfdlib build shared BFD/opcodes/libiberty library],
39[case "${enableval}" in
40 yes) commonbfdlib=true ;;
41 no) commonbfdlib=false ;;
42 *) AC_MSG_ERROR([bad value ${enableval} for BFD commonbfdlib option]) ;;
43esac])dnl
44
45# Generate a header file -- gets more post-processing by Makefile later.
46AC_CONFIG_HEADER(conf)
47
48dnl For recursion to work right, this must be an absolute pathname.
49AC_CONFIG_AUX_DIR(`cd $srcdir;pwd`/..)
50AC_CANONICAL_SYSTEM
51AC_ARG_PROGRAM
52
53te_file=generic
54
55canon_targets=""
56if test -n "$enable_targets" ; then
57 for t in `echo $enable_targets | sed 's/,/ /g'`; do
58 result=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $t 2>/dev/null`
59 if test -n "$result" ; then
60 canon_targets="$canon_targets $result"

--- 9 unchanged lines hidden (view full) ---

70
71for this_target in $target $canon_targets ; do
72
73changequote(,)dnl
74 eval `echo $this_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/cpu=\1 vendor=\2 os=\3/'`
75changequote([,])dnl
76
77 # check for architecture variants
78 case ${cpu} in
79 armeb) cpu_type=arm endian=big ;;
80 arm*) cpu_type=arm endian=little ;;
81 hppa*) cpu_type=hppa ;;
82changequote(,)dnl
83 i[456]86) cpu_type=i386 ;;
84 m680[012346]0) cpu_type=m68k ;;
85 m68008) cpu_type=m68k ;;
86 m683??) cpu_type=m68k ;;
87changequote([,])dnl
88 m8*) cpu_type=m88k ;;
89 mips*el) cpu_type=mips endian=little ;;
90 mips*) cpu_type=mips endian=big ;;
91 powerpcle*) cpu_type=ppc endian=little ;;
92 powerpc*) cpu_type=ppc endian=big ;;
93 rs6000*) cpu_type=ppc ;;
94 sparc64) cpu_type=sparc want_sparc_v9=true ;;
95 sparc*) cpu_type=sparc ;;
96 *) cpu_type=${cpu} ;;
97 esac
98
99 if test ${this_target} = $target ; then
100 target_cpu_type=${cpu_type}
101 elif test ${target_cpu_type} != ${cpu_type} ; then
102 continue
103 fi
104
105 targ=${cpu_type}
106 generic_target=${cpu_type}-$vendor-$os
107 dev=no
108 bfd_gas=no
109 em=generic
110
111 # assign object format
112 case ${generic_target} in
113 a29k-*-coff) fmt=coff targ=ebmon29k ;;
114 a29k-amd-udi) fmt=coff targ=ebmon29k ;;
115 a29k-amd-ebmon) fmt=coff targ=ebmon29k ;;
116 a29k-nyu-sym1) fmt=coff targ=ebmon29k ;;
117 a29k-*-vxworks*) fmt=coff ;;
118
119 alpha-*-*vms*) fmt=evax ;;
120 alpha-*-netware*) fmt=ecoff ;;
121 alpha-*-openbsd*) fmt=ecoff ;;
122 alpha-*-osf*) fmt=ecoff ;;
123 alpha-*-linuxecoff*) fmt=ecoff ;;
124 alpha-*-linux*) fmt=elf em=linux ;;
125
126
127 arm-*-riscix*) fmt=aout targ=arm-lit em=riscix ;;
128 arm-*-aout) fmt=aout
129 case "$endian" in
130 big) targ=arm-big ;;
131 *) targ=arm-lit ;;
132 esac
133 ;;
134 arm-*-coff) fmt=coff ;;
135 arm-*-riscix*) fmt=aout ;;
136 arm-*-pe) fmt=coff targ=armcoff em=pe ;;
137
138 d10v-*-*) fmt=elf bfd_gas=yes ;;
139
140 hppa-*-*elf*) fmt=elf em=hppa ;;
141 hppa-*-lites*) fmt=elf em=hppa ;;
142 hppa-*-osf*) fmt=som em=hppa ;;
143 hppa-*-rtems*) fmt=elf em=hppa ;;
144 hppa-*-hpux*) fmt=som em=hppa ;;
145 hppa-*-bsd*) fmt=som em=hppa ;;
146 hppa-*-hiux*) fmt=som em=hppa ;;
147
148 h8300-*-coff) fmt=coff ;;
149
150 i386-ibm-aix*) fmt=coff targ=i386coff
151 em=i386aix ;;
152 i386-sequent-bsd*) fmt=aout em=dynix bfd_gas=yes ;;
153 i386-*-bsd*) fmt=aout em=386bsd ;;
154 i386-*-netbsd0.8) fmt=aout em=386bsd ;;
155 i386-*-netbsd*) fmt=aout em=nbsd bfd_gas=yes;;
156 i386-*-openbsd*) fmt=aout em=nbsd bfd_gas=yes;;
157 i386-*-linux*aout* | i386-*-linuxoldld) fmt=aout em=linux ;;
158 i386-*-linux*coff*) fmt=coff em=linux
159 targ=i386coff ;;
160 i386-*-linux*) fmt=elf em=linux ;;
161 i386-*-lynxos*) fmt=coff targ=i386coff
162 em=lynx ;;
163 i386-*-sysv4* | i386-*-solaris* | i386-*-elf)
164 fmt=elf ;;
165 i386-*-freebsdelf*) fmt=elf em=freebsd ;;
166 i386-*-freebsd*) fmt=aout em=freebsd bfd_gas=yes ;;
167 i386-*-sco*elf*) fmt=elf targ=sco5 ;;
168 i386-*-coff | i386-*-sysv* | i386-*-sco* | i386-*-isc*)
169 fmt=coff targ=i386coff ;;
170 i386-*-vsta) fmt=aout ;;
171 i386-*-go32) fmt=coff targ=i386coff ;;
172 i386-*-rtems*) fmt=coff targ=i386coff ;;
173 i386-*-gnu*) fmt=elf ;;
174 i386-*-mach*)
175 fmt=aout em=mach bfd_gas=yes ;;
176 i386-*-msdos*) fmt=aout ;;
177 i386-*-moss*) fmt=elf ;;
178 i386-*-pe) fmt=coff targ=i386coff em=pe ;;
179 i386-*-cygwin32) fmt=coff targ=i386coff em=pe ;;
180 i386-*-*nt) fmt=coff targ=i386coff em=pe ;;
181 i960-*-bout) fmt=bout ;;
182 i960-*-coff) fmt=coff em=ic960 targ=ic960coff ;;
183 i960-*-rtems*) fmt=coff em=ic960 targ=ic960coff ;;
184 i960-*-nindy*) fmt=bout ;;
185 i960-*-vxworks4*) fmt=bout ;;
186 i960-*-vxworks5.0) fmt=bout ;;
187 i960-*-vxworks5.*) fmt=coff em=ic960 targ=ic960coff ;;
188 i960-*-vxworks*) fmt=bout ;;
189
190 m32r-*-*) fmt=elf bfd_gas=yes ;;
191
192 m68k-*-vxworks* | m68k-ericsson-ose | m68k-*-sunos*)
193 fmt=aout em=sun3 ;;
194 m68k-motorola-sysv*) fmt=coff targ=m68kcoff em=delta ;;
195 m68k-bull-sysv3*) fmt=coff targ=m68kcoff em=dpx2 ;;
196 m68k-apollo-*) fmt=coff targ=apollo em=apollo ;;
197 m68k-*-sysv4*) # must be before -sysv*
198 fmt=elf em=svr4 ;;
199 m68k-*-elf*) fmt=elf ;;
200 m68k-*-coff | m68k-*-sysv* | m68k-*-rtems*)
201 fmt=coff targ=m68kcoff ;;
202 m68k-*-hpux*) fmt=hp300 em=hp300 ;;
203 m68k-*-linux*aout*) fmt=aout em=linux ;;
204 m68k-*-linux*) fmt=elf em=linux ;;
205 m68k-*-lynxos*) fmt=coff targ=m68kcoff
206 em=lynx ;;
207 m68k-*-netbsd*) fmt=aout em=nbsd bfd_gas=yes ;;
208 m68k-*-openbsd*) fmt=aout em=nbsd bfd_gas=yes ;;
209 m68k-apple-aux*) fmt=coff targ=m68kcoff em=aux ;;
210 m68k-*-psos*) fmt=elf em=psos;;
211
212 m88k-motorola-sysv3*) fmt=coff targ=m88kcoff em=delt88 ;;
213 m88k-*-coff*) fmt=coff targ=m88kcoff ;;
214
215 # don't change em like *-*-bsd does
216 mips-dec-netbsd*) fmt=elf targ=mips-lit endian=little ;;
217 mips-dec-openbsd*) fmt=elf targ=mips-lit endian=little ;;
218 mips-dec-bsd*) fmt=aout targ=mips-lit ;;
219 mips-sony-bsd*) fmt=ecoff targ=mips-big ;;
220 mips-*-bsd*) AC_MSG_ERROR(Unknown vendor for mips-bsd configuration.) ;;
221 mips-*-ultrix*) fmt=ecoff targ=mips-lit endian=little ;;
222 mips-*-osf*) fmt=ecoff targ=mips-lit endian=little ;;
223 mips-*-ecoff*) fmt=ecoff
224 case "$endian" in
225 big) targ=mips-big ;;
226 *) targ=mips-lit ;;
227 esac
228 ;;
229 mips-*-ecoff*) fmt=ecoff targ=mips-big ;;
230 mips-*-irix6*) fmt=elf targ=mips-big ;;
231 mips-*-irix5*) fmt=elf targ=mips-big ;;
232 mips-*-irix*) fmt=ecoff targ=mips-big ;;
233 mips-*-lnews*) fmt=ecoff targ=mips-lit em=lnews ;;
234 mips-*-riscos*) fmt=ecoff targ=mips-big ;;
235 mips-*-sysv*) fmt=ecoff targ=mips-big ;;
236 mips-*-elf* | mips-*-rtems* | mips-*-linux* | mips-*-gnu* | mips-*-openbsd*)
237 fmt=elf
238 case "$endian" in
239 big) targ=mips-big ;;
240 *) targ=mips-lit ;;
241 esac
242 ;;
243 mn10200-*-*) fmt=elf bfd_gas=yes ;;
244 mn10300-*-*) fmt=elf bfd_gas=yes ;;
245 ppc-*-pe | ppc-*-cygwin32 | ppc-*-winnt*)
246 fmt=coff em=pe
247 case "$endian" in
248 big) targ=ppc-big ;;
249 *) targ=ppc-lit ;;
250 esac
251 ;;
252 ppc-*-aix*) fmt=coff ;;
253 ppc-*-beos*) fmt=coff ;;
254 ppc-*-*bsd* | ppc-*-elf* | ppc-*-eabi* | ppc-*-sysv4*)
255 fmt=elf
256 case "$endian" in
257 big) targ=ppc-big ;;
258 *) targ=ppc-lit ;;
259 esac
260 ;;
261 ppc-*-linux*) fmt=elf
262 case "$endian" in
263 big) targ=ppc-big ;;
264 *) AC_MSG_ERROR(Linux must be configured big endian) ;;
265 esac
266 ;;
267 ppc-*-solaris*) fmt=elf
268 case "$endian" in
269 big) AC_MSG_ERROR(Solaris must be configured little endian) ;;
270 *) targ=ppc-sol ;;
271 esac
272 ;;
273 ppc-*-rtems*)
274 fmt=elf
275 case "$endian" in
276 big) targ=ppc-big ;;
277 *) targ=ppc-lit ;;
278 esac
279 ;;
280 ppc-*-macos* | ppc-*-mpw*)
281 fmt=coff em=macos ;;
282 ppc-*-netware*) fmt=elf em=ppcnw ;;
283
284 sh-*-elf*) fmt=elf ;;
285 sh-*-coff*) fmt=coff ;;
286
287 ns32k-pc532-mach* | ns32k-pc532-ux*) fmt=aout em=pc532mach ;;
288 ns32k-pc532-netbsd* | ns32k-pc532-lites*) fmt=aout em=nbsd532 ;;
289 ns32k-pc532-openbsd*) fmt=aout em=nbsd532 ;;
290
291 sparc-*-rtems*) fmt=aout ;;
292 sparc-*-sunos4*) fmt=aout em=sun3 ;;
293 sparc-*-aout | sparc*-*-vxworks*)
294 fmt=aout em=sparcaout ;;
295 sparc-*-coff) fmt=coff ;;
296 sparc-*-linux*aout*) fmt=aout em=linux ;;
297 sparc-*-linux*) fmt=elf em=linux ;;
298 sparc-*-lynxos*) fmt=coff em=lynx ;;
299 sparc-fujitsu-none) fmt=aout ;;
300 sparc-*-elf | sparc-*-sysv4* | sparc-*-solaris*)
301 fmt=elf ;;
302 sparc-*-netbsd*) fmt=aout em=nbsd bfd_gas=yes ;;
303 sparc-*-openbsd*) fmt=aout em=nbsd bfd_gas=yes ;;
304
305 vax-*-bsd* | vax-*-ultrix*)
306 fmt=aout ;;
307 vax-*-vms) fmt=vms ;;
308
309 z8k-*-coff | z8k-*-sim)
310 fmt=coff ;;
311
312 w65-*-*) fmt=coff ;;

--- 10 unchanged lines hidden (view full) ---

323 *-*-elf | *-*-sysv4* | *-*-solaris*)
324 AC_MSG_WARN(GAS support for ${generic_target} is incomplete.)
325 fmt=elf dev=yes ;;
326 *-*-vxworks) fmt=aout ;;
327 *-*-netware) fmt=elf ;;
328 esac
329
330 case ${cpu_type}-${fmt} in
331 alpha-*) bfd_gas=yes ;;
332 arm-*) bfd_gas=yes ;;
333 # not yet
334 # i386-aout) bfd_gas=preferred ;;
335 mips-*) bfd_gas=yes ;;
336 ns32k-*) bfd_gas=yes ;;
337 ppc-*) bfd_gas=yes ;;
338 sparc-*) bfd_gas=yes ;;
339 *-elf) bfd_gas=yes ;;
340 *-ecoff) bfd_gas=yes ;;
341 *-som) bfd_gas=yes ;;
342 *) ;;
343 esac
344
345# Other random stuff.
346
347 # do we need the opcodes library?
348 case ${cpu_type} in
349 vax | i386)
350 ;;
351 *)
352 need_opcodes=yes
353 if test "${shared_opcodes}" = "true"; then
354 # A shared libopcodes must be linked against libbfd.
355 need_bfd=yes
356 fi
357 ;;
358 esac
359
360 test -n "$want_sparc_v9" && AC_DEFINE(SPARC_V9)
361
362 case ${cpu}-${vendor}-${os} in
363 sparc64-*-elf*) AC_DEFINE(SPARC_ARCH64) ;;
364 esac
365
366 case ${cpu_type} in
367 m32r)
368 case ${extra_objects} in
369 *cgen.o*) ;;
370 *) extra_objects="$extra_objects cgen.o"
371 AC_DEFINE(USING_CGEN)
372 ;;
373 esac

--- 18 unchanged lines hidden (view full) ---

392 fi
393
394 echo ${extra_objects} | grep -s "itbl-ops.o"
395 if test $? -ne 0 ; then
396 extra_objects="$extra_objects itbl-ops.o"
397 fi
398 ;;
399
400 *)
401 ;;
402 esac
403
404# See if we really can support this configuration with the emulation code.
405
406 if test $this_target = $target ; then
407 primary_bfd_gas=$bfd_gas
408 obj_format=$fmt
409 gas_target=$targ
410 te_file=$em
411
412 if test $bfd_gas = no ; then
413 # Can't support other configurations this way.
414 break
415 fi
416 elif test $bfd_gas = no ; then
417 # Can't support this configuration.
418 break
419 fi
420
421# From target name and format, produce a list of supported emulations.
422
423 case ${generic_target}-${fmt} in
424 mips-*-irix5*-*) emulation="mipsbelf mipslelf mipself mipsbecoff mipslecoff mipsecoff" ;;
425 mips-*-linux*-*) case "$endian" in
426 big) emulation="mipsbelf mipslelf mipself mipsbecoff mipslecoff mipsecoff" ;;
427 *) emulation="mipslelf mipsbelf mipself mipslecoff mipsbecoff mipsecoff" ;;
428 esac ;;
429 mips-*-lnews*-ecoff) ;;
430 mips-*-*-ecoff) case "$endian" in
431 big) emulation="mipsbecoff mipslecoff mipsecoff" ;;
432 *) emulation="mipslecoff mipsbecoff mipsecoff" ;;
433 esac ;;

--- 30 unchanged lines hidden (view full) ---

464if test ! -r ${srcdir}/config/tc-${target_cpu_type}.c; then
465 AC_MSG_ERROR(GAS does not support target CPU ${target_cpu_type})
466fi
467
468if test ! -r ${srcdir}/config/obj-${obj_format}.c; then
469 AC_MSG_ERROR(GAS does not have support for object file format ${obj_format})
470fi
471
472# and target makefile frag
473
474target_frag=${srcdir}/config/${gas_target}.mt
475if test ! -r ${target_frag}; then
476 target_frag=/dev/null # ick! but subst_file can't be conditionalized
477fi
478AC_SUBST_FILE(target_frag)
479
480case ${user_bfd_gas}-${primary_bfd_gas} in
481 yes-yes | no-no)
482 # We didn't override user's choice.
483 ;;
484 no-yes)
485 AC_MSG_WARN(Use of BFD is required for ${target}; overriding config options.)
486 ;;
487 no-preferred)

--- 106 unchanged lines hidden (view full) ---

594case "${primary_bfd_gas}" in
595 yes) AC_DEFINE(BFD_ASSEMBLER)
596 need_bfd=yes ;;
597esac
598
599# do we need the opcodes library?
600case "${need_opcodes}" in
601yes)
602 OPCODES_DEP=../opcodes/libopcodes.a
603 OPCODES_LIB='-L../opcodes -lopcodes'
604
605 # We need to handle some special cases for shared libraries.
606 case "${host}" in
607 *-*-sunos*)
608 # On SunOS, we must link against the name we are going to install,
609 # not -lbfd, since SunOS does not support SONAME.
610 if test "${shared_opcodes}" = "true"; then
611 OPCODES_LIB='-L../opcodes -l`echo opcodes | sed '"'"'$(program_transform_name)'"'"'`'
612 fi
613 ;;
614 alpha*-*-osf*)
615 # On Alpha OSF/1, the native linker searches all the -L
616 # directories for any LIB.so files, and only then searches for any
617 # LIB.a files. That means that if there is an installed
618 # libbfd.so, but this build is not done with --enable-shared, the
619 # link will wind up being against the install libbfd.so rather
620 # than the newly built libbfd. To avoid this, we must explicitly
621 # link against libbfd.a when --enable-shared is not used.
622 if test "${shared_opcodes}" != "true"; then
623 OPCODES_LIB='../opcodes/libopcodes.a'
624 fi
625 ;;
626 esac
627 ;;
628esac
629
630case "${need_bfd}" in
631yes)
632 BFDDEP=../bfd/libbfd.a
633 BFDLIB='-L../bfd -lbfd'
634 ALL_OBJ_DEPS="$ALL_OBJ_DEPS ../bfd/bfd.h"
635
636 # We need to handle some special cases for shared libraries
637 case "${host}" in
638 *-*-sunos*)
639 # On SunOS, we must link against the name we are going to install,
640 # not -lbfd, since SunOS does not support SONAME.
641 if test "${shared_bfd}" = "true"; then
642 BFDLIB='-L../bfd -l`echo bfd | sed '"'"'$(program_transform_name)'"'"'`'
643 fi
644 ;;
645 alpha*-*-osf*)
646 # On Alpha OSF/1, the native linker searches all the -L
647 # directories for any LIB.so files, and only then searches for any
648 # LIB.a files. That means that if there is an installed
649 # libbfd.so, but this build is not done with --enable-shared, the
650 # link will wind up being against the install libbfd.so rather
651 # than the newly built libbfd. To avoid this, we must explicitly
652 # link against libbfd.a when --enable-shared is not used.
653 if test "${shared_bfd}" != "true"; then
654 BFDLIB='../bfd/libbfd.a'
655 fi
656 ;;
657 esac
658
659 if test "${commonbfdlib}" = "true"; then
660 # when a shared libbfd is built with --enable-commonbfdlib,
661 # all of libopcodes is available in libbfd.so
662 OPCODES_LIB=
663 fi
664 ;;
665esac
666
667AC_SUBST(BFDDEP)
668AC_SUBST(BFDLIB)
669AC_SUBST(OPCODES_DEP)
670AC_SUBST(OPCODES_LIB)
671
672AC_SUBST(ALL_OBJ_DEPS)
673
674AC_DEFINE_UNQUOTED(TARGET_ALIAS, "${target_alias}")
675AC_DEFINE_UNQUOTED(TARGET_CANONICAL, "${target}")
676AC_DEFINE_UNQUOTED(TARGET_CPU, "${target_cpu}")
677AC_DEFINE_UNQUOTED(TARGET_VENDOR, "${target_vendor}")
678AC_DEFINE_UNQUOTED(TARGET_OS, "${target_os}")
679
680AC_PROG_CC
681AC_PROG_INSTALL
682
683AC_CHECK_HEADERS(string.h stdlib.h memory.h strings.h unistd.h stdarg.h varargs.h errno.h sys/types.h)
684
685# Put this here so that autoconf's "cross-compiling" message doesn't confuse
686# people who are not cross-compiling but are compiling cross-assemblers.
687AC_MSG_CHECKING(whether compiling a cross-assembler)
688if test "${host}" = "${target}"; then
689 cross_gas=no
690else

--- 47 unchanged lines hidden (view full) ---

738# Does errno.h declare errno, or do we have to add a separate declaration
739# for it?
740GAS_CHECK_DECL_NEEDED(errno, f, int f, [
741#ifdef HAVE_ERRNO_H
742#include <errno.h>
743#endif
744])
745
746HLDFLAGS=
747HLDENV=
748RPATH_ENVVAR=LD_LIBRARY_PATH
749# If we have shared libraries, try to set rpath reasonably.
750if test "${shared}" = "true"; then
751 case "${host}" in
752 *-*-hpux*)
753 HLDFLAGS='-Wl,+s,+b,$(libdir)'
754 RPATH_ENVVAR=SHLIB_PATH
755 ;;
756 *-*-irix5* | *-*-irix6*)
757 HLDFLAGS='-Wl,-rpath,$(libdir)'
758 ;;
759 *-*-linux*aout*)
760 ;;
761 *-*-linux*)
762 HLDFLAGS='-Wl,-rpath,$(libdir)'
763 ;;
764 *-*-solaris*)
765 HLDFLAGS='-R $(libdir)'
766 ;;
767 *-*-sysv4*)
768 HLDENV='if test -z "$${LD_RUN_PATH}"; then LD_RUN_PATH=$(libdir); else LD_RUN_PATH=$${LD_RUN_PATH}:$(libdir); fi; export LD_RUN_PATH;'
769 ;;
770 esac
771fi
772
773# On SunOS, if the linker supports the -rpath option, use it to
774# prevent ../bfd and ../opcodes from being included in the run time
775# search path.
776case "${host}" in
777 *-*-sunos*)
778 echo 'main () { }' > conftest.c
779 ${CC} -o conftest -Wl,-rpath= conftest.c >/dev/null 2>conftest.t
780 if grep 'unrecognized' conftest.t >/dev/null 2>&1; then
781 :
782 elif grep 'No such file' conftest.t >/dev/null 2>&1; then
783 :
784 elif grep 'do not mix' conftest.t >/dev/null 2>&1; then
785 :
786 elif test "${shared}" = "true"; then
787 HLDFLAGS='-Wl,-rpath=$(libdir)'
788 else
789 HLDFLAGS='-Wl,-rpath='
790 fi
791 rm -f conftest.t conftest.c conftest
792 ;;
793esac
794AC_SUBST(HLDFLAGS)
795AC_SUBST(HLDENV)
796AC_SUBST(RPATH_ENVVAR)
797
798dnl This must come last.
799
800dnl We used to make symlinks to files in the source directory, but now
801dnl we just use the right name for .c files, and create .h files in
802dnl the build directory which include the right .h file. Make sure
803dnl the old symlinks don't exist, so that a reconfigure in an existing
804dnl directory behaves reasonably.
805

--- 12 unchanged lines hidden ---