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