xref: /freebsd/contrib/bmake/find_lib.sh (revision c0a4a7bb942fd3302f0093e4353820916d3661d1)
1:
2re=$1; shift
3
4# some Linux systems have deprecated egrep in favor of grep -E
5# but not everyone supports that
6case "`echo bmake | egrep 'a|b' 2>&1`" in
7bmake) ;;
8*) egrep() { grep -E "$@"; }
9esac
10
11for lib in $*
12do
13  found=`nm $lib | egrep "$re"`
14  case "$found" in
15  "") ;;
16  *)	echo "$lib: $found";;
17  esac
18done
19
20
21