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