-AC_DEFUN([gcc_AC_TOOL_DIRS], [
-# When searching for the assembler or linker, search the same directories
-# that the installed compiler will search. Else we may find the wrong
-# assembler or linker and lose. If we do not find a suitable binary,
-# then try the user's path.
-#
-# Also note we have to check MD_EXEC_PREFIX before checking the user's path.
-if test "x$exec_prefix" = xNONE; then
- if test "x$prefix" = xNONE; then
- gcc_cv_tool_prefix=/usr/local
- else
- gcc_cv_tool_prefix=$prefix
- fi
-else
- gcc_cv_tool_prefix=$exec_prefix
-fi
-
-if test x$host = x$build; then
- gcc_cv_tool_dirs="$gcc_cv_tool_prefix/libexec/gcc/$target_noncanonical/$gcc_version"
- gcc_cv_tool_dirs="$gcc_cv_tool_dirs$PATH_SEPARATOR$gcc_cv_tool_prefix/libexec/gcc/$target_noncanonical"
- gcc_cv_tool_dirs="$gcc_cv_tool_dirs$PATH_SEPARATOR/usr/lib/gcc/$target_noncanonical/$gcc_version"
- gcc_cv_tool_dirs="$gcc_cv_tool_dirs$PATH_SEPARATOR/usr/lib/gcc/$target_noncanonical"
- gcc_cv_tool_dirs="$gcc_cv_tool_dirs$PATH_SEPARATOR$gcc_cv_tool_prefix/$target_noncanonical/bin/$target_noncanonical/$gcc_version"
- gcc_cv_tool_dirs="$gcc_cv_tool_dirs$PATH_SEPARATOR$gcc_cv_tool_prefix/$target_noncanonical/bin"
-else
- gcc_cv_tool_dirs=
-fi
-
-if test x$build = x$target; then
- # Rummage through tm_files looking for MD_EXEC_PREFIX
- md_dirs=
- for f in ${tm_file_list}; do
- if test -f $f; then
- if grep '^#[ ]*undef[ ]*MD_EXEC_PREFIX' $f > /dev/null; then
- md_dirs=
- fi
- md_dirs="$md_dirs "`sed -n -e 's@^#[ ]*define[ ]*MD_EXEC_PREFIX[ ]*"\(.*\)/"@\1@p' < $f`
- fi
- done
- for f in ${md_dirs}; do
- gcc_cv_tool_dirs="$gcc_cv_tool_dirs$PATH_SEPARATOR$f"
- done
-fi])
-