find_opt=""
fi
-for source_extension in $source_extensions; do
- find . \( \
+# SunOS find does not support -path. Try to find a binary which does.
+if [ -n "$GNUFIND" ]; then ;
+elif which gfind >/dev/null; then GNUFIND=gfind
+elif which gnufind >/dev/null; then GNUFIND=gnufind
+else GNUFIND=find; fi
+if ! "$GNUFIND" /dev/null -path dummy 2>/dev/null; then
+ echo "Warning: $GNUFIND might not be GNU: use of -path fails." 1>&2
+fi
+
+for source_extension in $source_extensions; do
+ "$GNUFIND" . \( \
-path contrib/asdf -o \
-name _darcs -o \
-name '{arch}' -o \