1 dnl Process this file with autoconf to produce a configure script.
6 [ --enable-shared build shared BFD library],
7 [case "${enableval}" in
20 alpha-*-*) MY_TARGET=alpha ;;
22 i[345]86-*-*) MY_TARGET=i386 ;;
24 sparc-*-*) MY_TARGET=sparc ;;
25 tahoe-*-*) MY_TARGET=tahoe ;;
26 vax-*-*) MY_TARGET=vax ;;
27 ns32k-*-*) MY_TARGET=ns532;;
28 *-*-*) MY_TARGET=dummy ;;
33 BFDLIB='-L../bfd -lbfd'
35 # We need to handle some special cases if BFD was built shared.
36 if test "${shared}" = "true"; then
39 # On SunOS, we must link against the name we are going to install,
40 # not -lbfd, since SunOS does not support SONAME.
41 BFDLIB='-L../bfd -l`echo bfd | sed '"'"'$(program_transform_name)'"'"'`'
48 # If we have shared libraries, try to set rpath reasonably.
49 if test "${shared}" = "true"; then
52 HLDFLAGS='-Wl,+s,+b,$(libdir)'
55 HLDFLAGS='-Wl,-rpath,$(libdir)'
60 HLDFLAGS='-Wl,-rpath,$(libdir)'
62 *-*-sysv4* | *-*-solaris*)
63 HLDFLAGS='-R $(libdir)'
68 # On SunOS, if the linker supports the -rpath option, use it to
69 # prevent ../bfd and ../opcodes from being included in the run time
73 echo 'main () { }' > conftest.c
74 ${CC} -o conftest -Wl,-rpath= conftest.c >/dev/null 2>conftest.t
75 if grep 'unrecognized' conftest.t >/dev/null 2>&1; then
77 elif grep 'No such file' conftest.t >/dev/null 2>&1; then
79 elif grep 'do not mix' conftest.t >/dev/null 2>&1; then
81 elif test "${shared}" = "true"; then
82 HLDFLAGS='-Wl,-rpath=$(libdir)'
84 HLDFLAGS='-Wl,-rpath='
86 rm -f conftest.t conftest.c conftest