Index: oprofile-0.9.2-mpj/m4/cellspubfdsupport.m4
===================================================================
--- oprofile-0.9.2-mpj.orig/m4/cellspubfdsupport.m4
+++ oprofile-0.9.2-mpj/m4/cellspubfdsupport.m4
@@ -31,16 +31,20 @@ AC_MSG_RESULT([yes])],
 AC_LANG_POP(C)
 LIBS=$SAVE_LIBS
 
-arch="unknown"
-AC_ARG_WITH(target,
-[  --with-target=cell-be   Check BFD support for Cell Broadband Engine SPU profiling], arch=$withval)
-
-if test "$arch" = "cell-be"; then
-        if test "$bfd_open_iovec_7" = "yes"; then
-	        AC_MSG_NOTICE([BFD library has support for Cell Broadband Engine SPU profiling])
+if test "$bfd_open_iovec_7" = "yes"; then
+        AC_MSG_NOTICE([BFD library has support for Cell Broadband Engine SPU profiling])
+else
+	if test -r "/usr/powerpc64-linux/lib/libbfd.a"; then
+		AC_MSG_NOTICE([Installed BFD library does not support elf32-spu target; switching to /usr/powerpc64-linux/lib])
+		BFD_LIBS="-L/usr/powerpc64-linux/lib $BFD_LIBS"
+		CXXFLAGS="$CXXFLAGS -I /usr/powerpc64-linux/include"
+		AC_DEFINE([HAVE_BFD_OPENR_IOVEC_WITH_7PARMS],
+	        [],
+	        [Defined if you have the version of bfd_openr_iovec with 7 parameters])
 	else
 		AC_ERROR([BFD library does not support elf32-spu target; SPU profiling is unsupported])
 	fi
 fi
+
 ]
 )

