xref: /freebsd/contrib/bmake/find_lib.sh (revision 2008043f386721d58158e37e0d7e50df8095942d)
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