dnl
dnl AC_SEARCH_GNU_MAKE(command_path_variable)
dnl
AC_DEFUN(AC_SEARCH_GNU_MAKE,[
	AC_MSG_CHECKING([the gnu make is])
	ac_search_gnu_make_result="" ;
	ac_search_gnu_make_path=`echo $PATH | sed 's/:/ /g'` ;
	for ac_search_gnu_make_path in $ac_search_gnu_make_path ; do
		ac_search_gnu_make_list="gmake make" ;
		for ac_search_gnu_make_exec in $ac_search_gnu_make_list ; do
			ac_search_gnu_make_cmd="$ac_search_gnu_make_path/$ac_search_gnu_make_exec" ;
			if test -x $ac_search_gnu_make_cmd ; then
				if $ac_search_gnu_make_cmd --version -n 1>/dev/null 2>/dev/null ; then
					if test -z "$ac_search_gnu_make_result" ; then
						ac_search_gnu_make_result=$ac_search_gnu_make_cmd ;
					fi
				fi
			fi
		done
	done
	if test -n "$ac_search_gnu_make_result" ; then
		$1=$ac_search_gnu_make_result ;
		AC_SUBST($1)
		AC_MSG_RESULT([$ac_search_gnu_make_result])
	else
		AC_MSG_RESULT([not found])
	fi
])

