dnl CF_WITH_PATH_PROG version: 1 updated: 2019/06/30 19:44:43
dnl -----------------
dnl Check for a given program, like CF_PATH_PROG, but allow override using a
dnl "--with-xxx" option.
dnl
dnl Parameters:
dnl		$1 = environment variable to set/update
dnl		$2 = program name
dnl		$3 = help-text
dnl		$4 = $PATH
AC_DEFUN([CF_WITH_PATH_PROG],[
AC_ARG_WITH($2-path,
	[  --with-$2-path=XXX     specify path of $2 ifelse($3,,,$3)],
	[AC_MSG_CHECKING(for $2 program ifelse($3,,,$3))
		$1=$withval
		AC_MSG_RESULT([$]$1)
		CF_PATH_SYNTAX($1)
	],
	[CF_PATH_PROG($1,$2,,ifelse($4,,,$4))
		if test -z "[$]$1"
		then
			AC_MSG_WARN(no $2 program found ifelse($3,,,$3))
		fi
	])
])
