1 dnl Process this file with autoconf to produce a configure script.
6 [ --enable-shared build shared BFD library],
7 [case "${enableval}" in
10 *) AC_MSG_ERROR([bad value ${enableval} for BFD shared option]) ;;
19 alpha-*-*) MY_TARGET=alpha ;;
21 i[345]86-*-*) MY_TARGET=i386 ;;
23 sparc-*-*) MY_TARGET=sparc ;;
24 tahoe-*-*) MY_TARGET=tahoe ;;
25 vax-*-*) MY_TARGET=vax ;;
26 ns32k-*-*) MY_TARGET=ns532;;
27 *-*-*) MY_TARGET=dummy ;;
32 BFDLIB='-L../bfd -lbfd'
34 # We need to handle some special cases if BFD was built shared.
35 if test "${shared}" = "true"; then
38 # On SunOS, we must link against the name we are going to install,
39 # not -lbfd, since SunOS does not support SONAME.
40 BFDLIB='-L../bfd -l`echo bfd | sed '"'"'$(program_transform_name)'"'"'`'
47 # If we have shared libraries, try to set rpath reasonably.
48 if test "${shared}" = "true"; then
51 HLDFLAGS='-Wl,-rpath,$(libdir)'
56 HLDFLAGS='-Wl,-rpath,$(libdir)'
58 *-*-sysv4* | *-*-solaris*)
59 HLDFLAGS='-R $(libdir)'
64 # On SunOS, if the linker supports the -rpath option, use it to
65 # prevent ../bfd and ../opcodes from being included in the run time
69 echo 'main () { }' > conftest.c
70 ${CC} -o conftest -Wl,-rpath= conftest.c >/dev/null 2>conftest.t
71 if grep 'unrecognized' conftest.t >/dev/null 2>&1; then
73 elif grep 'No such file' conftest.t >/dev/null 2>&1; then
75 elif test "${shared}" = "true"; then
76 HLDFLAGS='-Wl,-rpath=$(libdir)'
78 HLDFLAGS='-Wl,-rpath='
80 rm -f conftest.t conftest.c conftest