1 dnl Some autoconf macros for AROS
3 dnl Search for a file, and place the result into the cache.
5 dnl AROS_REQUIRED(name,var)
6 dnl Checks if var is defined, and aborts otherwise
7 AC_DEFUN(AROS_REQUIRED,
8 [if test "$2" = ""; then
9 AC_MSG_ERROR($1 is required to build AROS. Please install and run configure again.)
12 dnl AROS_PROG(var,prog,args)
14 [AC_CHECK_PROG([$1],[$2],[$2])
15 ifelse($3, ,, $1="$$1 $3")
18 dnl AROS_TOOL(var,prog,args)
19 dnl This will later on check the $target-$(tool) stuff, but at the
20 dnl moment it only does the same as AROS_PROG
23 [AC_PATH_PROG([$1],[$2],[$2])
24 ifelse($3, ,, $1="$$1 $3")
27 dnl AROS_TOOL_CC(var,prog,args)
28 dnl This is effectively the same as AROS_TOOL, but only does the
29 dnl test when we are cross compiling.
31 AC_DEFUN(AROS_TOOL_CC,
32 [if test "$cross_compile" = "yes" ; then
33 AC_PATH_PROG([$1],[$2],[$2])
37 ifelse($3, ,, $1="$$1 $3")
40 dnl AROS_CACHE_CHECK(message, var, check)
41 dnl This is similar to the AC_CACHE_CHECK macro, but it hides the
42 dnl prefix and stuff from the coders. We will get aros_$2 on the
43 dnl variable, and aros_cv_$2 on the cache variable.
44 AC_DEFUN(AROS_CACHE_CHECK,
45 [AC_MSG_CHECKING([$1])
46 AC_CACHE_VAL(aros_cv_[$2],
48 aros_cv_[$2]="[$]aros_[$2]"
50 aros_[$2]="[$]aros_cv_[$2]"
51 AC_MSG_RESULT([$]aros_$2)])