1 dnl Process this file with autoconf to produce a configure script.
6 [ --enable-shared build shared BFD library],
7 [case "${enableval}" in
23 alpha-*-*) MY_TARGET=alpha ;;
25 i[3456]86-*-*) MY_TARGET=i386 ;;
27 sparc-*-*) MY_TARGET=sparc ;;
28 tahoe-*-*) MY_TARGET=tahoe ;;
29 vax-*-*) MY_TARGET=vax ;;
30 ns32k-*-*) MY_TARGET=ns532;;
31 *-*-*) MY_TARGET=dummy ;;
36 BFDLIB='-L../bfd -lbfd'
38 # We need to handle some special cases if BFD was built shared.
41 # On SunOS, we must link against the name we are going to install,
42 # not -lbfd, since SunOS does not support SONAME.
43 if test "${shared}" = "true"; then
44 BFDLIB='-L../bfd -l`echo bfd | sed '"'"'$(program_transform_name)'"'"'`'
48 # On Alpha OSF/1, the native linker searches all the -L
49 # directories for any LIB.so files, and only then searches for any
50 # LIB.a files. That means that if there is an installed
51 # libbfd.so, but this build is not done with --enable-shared, the
52 # link will wind up being against the install libbfd.so rather
53 # than the newly built libbfd. To avoid this, we must explicitly
54 # link against libbfd.a when --enable-shared is not used.
55 if test "${shared}" != "true"; then
56 BFDLIB='../bfd/libbfd.a'
64 # If we have shared libraries, try to set rpath reasonably.
65 if test "${shared}" = "true"; then
68 HLDFLAGS='-Wl,+s,+b,$(libdir)'
71 HLDFLAGS='-Wl,-rpath,$(libdir)'
76 HLDFLAGS='-Wl,-rpath,$(libdir)'
79 HLDFLAGS='-R $(libdir)'
82 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;'
87 # On SunOS, if the linker supports the -rpath option, use it to
88 # prevent ../bfd and ../opcodes from being included in the run time
92 echo 'main () { }' > conftest.c
93 ${CC} -o conftest -Wl,-rpath= conftest.c >/dev/null 2>conftest.t
94 if grep 'unrecognized' conftest.t >/dev/null 2>&1; then
96 elif grep 'No such file' conftest.t >/dev/null 2>&1; then
98 elif grep 'do not mix' conftest.t >/dev/null 2>&1; then
100 elif test "${shared}" = "true"; then
101 HLDFLAGS='-Wl,-rpath=$(libdir)'
103 HLDFLAGS='-Wl,-rpath='
105 rm -f conftest.t conftest.c conftest