1define([AC_FIND_PROGRAM],dnl
2[if test x$3 = x; then _PATH=$PATH; else _PATH=$3; fi
3if test -z "[$]$1"; then
4  # Extract the first word of `$2', so it can be a program name with args.
5  set dummy $2; word=[$]2
6  echo checking for $word
7  IFS="${IFS= 	}"; saveifs="$IFS"; IFS="${IFS}:"
8  for dir in $_PATH; do
9    test -z "$dir" && dir=.
10    if test -f $dir/$word; then
11      $1=$dir/$word
12      break
13    fi
14  done
15  IFS="$saveifs"
16fi
17test -n "[$]$1" && test -n "$verbose" && echo "	setting $1 to [$]$1"
18AC_SUBST($1)dnl
19])dnl
20dnl
21define([AC_ECHON],dnl
22[echo checking for echo -n
23if test "`echo -n foo`" = foo ; then
24  ECHON=bsd
25  test -n "$verbose" && echo '	using echo -n'
26elif test "`echo 'foo\c'`" = foo ; then
27  ECHON=sysv
28  test -n "$verbose" && echo '	using echo ...\\c'
29else
30  ECHON=none
31  test -n "$verbose" && echo '	using plain echo'
32fi])dnl
33dnl
34define([AC_LISPDIR],dnl
35[AC_MSG_CHECKING(checking for Emacs Lisp files)
36if test -n "$with_lispdir"; then
37  LISPDIR=${with_lispdir}
38else
39  for f in ${prefix-/usr/local}/lib/emacs/site-lisp \
40	   ${prefix-/usr/local}/lib/emacs/lisp; do
41    if test -d $f; then
42      if test -n "$prefix"; then
43	LISPDIR=`echo $f | sed "s,^$prefix,"'$(prefix),'`
44      else
45	LISPDIR=$f
46      fi
47      break
48    fi
49  done
50fi
51if test -z "$LISPDIR"; then
52dnl # Change this default when Emacs 19 has been around for a while
53  LISPDIR='$(prefix)/lib/emacs/lisp'
54fi
55AC_MSG_RESULT(${LISPDIR})
56AC_SUBST(LISPDIR)dnl
57])dnl
58dnl
59define([AC_PASSWD],dnl
60[echo checking how to access passwd database
61PASSWD="cat /etc/passwd"
62if test -f /bin/domainname && test -n "`/bin/domainname`"; then
63  if test -f /usr/bin/niscat && 
64     /usr/bin/niscat passwd.org_dir > /dev/null 2>&1; then
65    PASSWD="/usr/bin/niscat passwd.org_dir"
66  elif test -f /usr/bin/ypcat && /usr/bin/ypcat passwd > /dev/null 2>&1; then
67    PASSWD="/usr/bin/ypcat passwd"
68  fi
69fi
70test -n "$verbose" && echo "	setting PASSWD to ${PASSWD}"
71AC_SUBST(PASSWD)dnl
72])dnl
73