5b0f84fd370fbcc7366063b39634b81dad4de359
[openafs.git] / src / cf / search-dirlist.m4
1 # OPENAFS_SEARCH_DIRLIST(VARIABLE, [PATHS TO SEARCH], [TARGET FILE])
2 AC_DEFUN([OPENAFS_SEARCH_DIRLIST],
3 [openafs_dirpath=no
4   for openafs_var in [$2]; do
5     if test -r "$openafs_var/[$3]"; then
6       openafs_dirpath=$openafs_var
7       break
8     fi
9   done
10   if test x"$openafs_dirpath" == xno; then
11     [$1]=
12   else
13     [$1]=$openafs_dirpath
14   fi
15 ])