- mdw_cv_wireshark_plugin_dir="failed"
- wsprefix=none
- for i in "${prefix}" /usr/local /usr `echo $PATH | tr : " "`; do
- if test -x "$i/bin/tshark"; then
- wsprefix=$i
- break
- fi
- done
- if test "$wsprefix" != none; then
- wsbin=$wsprefix/bin/tshark
- wsver=`$wsbin -v | sed ['s/^[^ ]* \([0-9A-Za-z.]*\).*$/\1/;q']`
- dir=$wsprefix/lib/wireshark/plugins
- test -d "$dir/$wsver" && dir="$dir/$wsver"
- if test -d "$dir"; then
- mdw_cv_wireshark_plugin_dir=$dir
- fi
- fi
+ mdw_cv_wireshark_plugin_dir=$(
+ for i in \
+ $libexecdir $libdir $exec_prefix/lib $prefix/lib \
+ /usr/local/lib /usr/lib
+ do
+ for j in \
+ wireshark/plugins/* wireshark/*/plugins \
+ */wireshark/plugins/* */wireshark/*/plugins
+ do
+ for k in $i/$j/*.so; do
+ if test -f "$k"; then
+ echo $(AS_DIRNAME(["$k"]))
+ exit
+ fi
+ done
+ done
+ done
+ echo "failed"
+ )