--- libtool-2.4.3/m4/libtool.m4.orig 2003-04-14 23:58:23.000000000 +0200 +++ libtool-2.4.3/m4/libtool.m4 2003-04-20 12:22:06.000000000 +0200 @@ -1103,6 +1103,21 @@ else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi + # sanitize + new_sys_lib_search_path_spec= + for d in $sys_lib_search_path_spec ; do + # check if exists + if test -d $d -a -x $d ; then + # normalize + new_d=$(cd $d ; pwd) + # uniq + if ! echo "$new_sys_lib_search_path_spec" | grep -q -F -e " $new_d " ; then + new_sys_lib_search_path_spec="$new_sys_lib_search_path_spec $new_d " + fi + fi + done + # compress spaces + sys_lib_search_path_spec=`echo "$new_sys_lib_search_path_spec" | $SED -e 's/^ *//g;s/ \+/ /g;s/ $//g'` else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi