+2002-12-28 Alexandre Oliva <aoliva@redhat.com>
+
+ * acx.m4: Name cache variables properly.
+ (NCN_STRICT_CHECK_TOOL): If program is not found and
+ value-if-not-found is empty, use ${ncn_tool_prefix}$2 or $2,
+ depending on whether build != host or not.
+ (NCN_STRICT_CHECK_TARGET_TOOL): Ditto, with the target prefix.
+
2002-12-28 Nathanael Nerode <neroden@gcc.gnu.org>
* acx.m4: New.
[${ncn_target_tool_prefix}$2], , [$4])
fi
if test -z "$ac_cv_prog_$1" ; then
- ncn_ct_$1=$$1
- AC_CHECK_PROG([ncn_ct_$1], [$2], [$2], [$3], [$4])
- $1=$ncn_ct_$1
+ ncn_cv_$1=$$1
+ AC_CHECK_PROG([ncn_cv_$1], [$2], [$2], [$3], [$4])
+ $1=$ncn_cv_$1
else
$1="$ac_cv_prog_$1"
fi
fi
if test -z "$ac_cv_prog_$1" ; then
if test $build = $host ; then
- ncn_ct_$1=$$1
- AC_CHECK_PROG([ncn_ct_$1], [$2], [$2], [$3], [$4])
- $1=$ncn_ct_$1
+ ncn_cv_$1=$$1
+ AC_CHECK_PROG([ncn_cv_$1], [$2], [$2], [ifelse([$3],[],[$2],[$3])], [$4])
+ $1=$ncn_cv_$1
else
- $1="$3"
+ $1="ifelse([$3],[],[${ncn_tool_prefix}$2],[$3])"
fi
else
$1="$ac_cv_prog_$1"
fi
if test -z "$ac_cv_prog_$1" ; then
if test $build = $target ; then
- ncn_ct_$1=$$1
- AC_CHECK_PROG([ncn_ct_$1], [$2], [$2], [$3], [$4])
- $1=$ncn_ct_$1
+ ncn_cv_$1=$$1
+ AC_CHECK_PROG([ncn_cv_$1], [$2], [$2], [ifelse([$3],[],[$2],[$3])], [$4])
+ $1=$ncn_cv_$1
else
- $1="$3"
+ $1="ifelse([$3],[],[${ncn_target_tool_prefix}$2],[$3])"
fi
else
$1="$ac_cv_prog_$1"
fi
]) []dnl # NCN_STRICT_CHECK_TARGET_TOOL
-
-