Index: ChangeLog
===================================================================
RCS file: /sources/libtool/libtool/ChangeLog,v
retrieving revision 1.2465
diff -u -r1.2465 ChangeLog
--- ChangeLog	4 Jun 2007 03:30:21 -0000	1.2465
+++ ChangeLog	6 Jun 2007 05:16:53 -0000
@@ -0,0 +1,5 @@
+2007-06-06  Peter O'Gorman  <peter@pogma.com>
+	* libltdl/m4/libtool.m4 [darwin]: When configured with
+	-isysroot in CC, CFLAGS or LDFLAGS prepend this root to the
+	sys_lib_search_path_spec.
+
Index: libltdl/m4/libtool.m4
===================================================================
RCS file: /sources/libtool/libtool/libltdl/m4/libtool.m4,v
retrieving revision 1.105
diff -u -r1.105 libtool.m4
--- libltdl/m4/libtool.m4	4 Jun 2007 03:01:11 -0000	1.105
+++ libltdl/m4/libtool.m4	6 Jun 2007 05:16:54 -0000
@@ -2138,7 +2138,22 @@
   shlibpath_var=DYLD_LIBRARY_PATH
   shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
 m4_if([$1], [],[
-  sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 
+  sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"
+  case " $CC $CFLAGS $LDFLAGS " in
+    *" -isysroot "*)
+      _lt_root=`echo "$CC $CFLAGS $LDFLAGS " | sed -e 's/.*-isysroot//' | awk '{print [$]1}'`
+      _lt_tmp_sys_lib_search_path_spec=$sys_lib_search_path_spec
+      sys_lib_search_path_spec=
+      for _lt_tmp_path in $_lt_tmp_sys_lib_search_path_spec; do
+        if test -d "$_lt_root/$_lt_tmp_path" ;then
+          sys_lib_search_path_spec="$sys_lib_search_path_spec $_lt_root/$_lt_tmp_path"
+        else
+          sys_lib_search_path_spec="$sys_lib_search_path_spec $_lt_tmp_path"
+        fi
+     done
+	  
+    ;;
+  esac]) 
   sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
   ;;
 
