* configure.in: On alpha*-*-osf*, link against libbfd.a if not
[deliverable/binutils-gdb.git] / gprof / configure.in
index 4b0a616b59a4a803b76cef7eb4490c041227f8d8..d10dcd94d5f3e62477b165360c7ce4c0c0b0d95d 100644 (file)
@@ -33,15 +33,27 @@ AC_SUBST(MY_TARGET)
 BFDLIB='-L../bfd -lbfd'
 
 # We need to handle some special cases if BFD was built shared.
-if test "${shared}" = "true"; then
-  case "${host}" in
+case "${host}" in
   *-*-sunos*)
   # On SunOS, we must link against the name we are going to install,
   # not -lbfd, since SunOS does not support SONAME.
-  BFDLIB='-L../bfd -l`echo bfd | sed '"'"'$(program_transform_name)'"'"'`'
+  if test "${shared}" = "true"; then
+    BFDLIB='-L../bfd -l`echo bfd | sed '"'"'$(program_transform_name)'"'"'`'
+  fi
   ;;
-  esac
-fi
+alpha*-*-osf*)
+  # On Alpha OSF/1, the native linker searches all the -L
+  # directories for any LIB.so files, and only then searches for any
+  # LIB.a files.  That means that if there is an installed
+  # libbfd.so, but this build is not done with --enable-shared, the
+  # link will wind up being against the install libbfd.so rather
+  # than the newly built libbfd.  To avoid this, we must explicitly
+  # link against libbfd.a when --enable-shared is not used.
+  if test "${shared}" != "true"; then
+    BFDLIB='../bfd/libbfd.a'
+  fi
+  ;;
+esac
 AC_SUBST(BFDLIB)
 
 HLDFLAGS=
This page took 0.024926 seconds and 4 git commands to generate.