forked from qunying/rhide
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaclocal.m4
40 lines (40 loc) · 877 Bytes
/
aclocal.m4
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
AC_DEFUN(RH_CHECK_FILE_LIST,
[
AC_MSG_CHECKING([for $4])
AC_CACHE_VAL(rh_cv_path_$1,
[case "[$]$1" in
/*)
rh_cv_path_$1="[$]$1" # Let the user override the test with a path.
;;
?:/*)
rh_cv_path_$1="[$]$1" # Let the user override the test with a dos path.
;;
esac
if test -z $rh_cv_path_$1; then
if test "$cross_compiling" = yes; then
AC_MSG_ERROR(Cannot check for file existence when cross compiling)
else
for dir in $3; do
if test -r $dir/$2; then
eval "rh_cv_path_$1=$dir"
break;
else
eval "rh_cv_path_$1=no"
fi
done
fi
fi
])dnl
$1="$rh_cv_path_$1"
AC_MSG_RESULT([$]$1)
if test "[$]$1" = no; then
if test "x$5" = x; then
AC_MSG_ERROR([Could not find $4.
Please give me a hint by setting the variable $1])
else
AC_MSG_WARN([Could not find $4.
$5])
fi
fi
AC_SUBST($1)dnl
])