| I want to make sure that two functions are available, and die if they're
| not.
| 
| 
| AC_CHECK_FUNC(seteuid, AC_DEFINE(HAVE_SETEUID, 1), AC_MSG_ERROR([This
| program re
| quires that seteuid be available]))
| 
| AC_CHECK_FUNC(getpwent, AC_DEFINE(HAVE_GETPWENT, 1), AC_MSG_ERROR([This
| program 
| requires that getpwent be available]))

It is essentially right, but not totally.  You have two problems:
underquoted (and your configure will not run), and missing description
for the CPP symbols you define (and autoheader will die).

To solve the quotation problem, do this:

AC_CHECK_FUNC(seteuid, 
              [AC_DEFINE(HAVE_SETEUID, 1)],
              [AC_MSG_ERROR([This program re quires that seteuid be available])])

to solve the CPP problem, either give the description (3rd arg to
AC_DEFINE), or better yet, use AC_CHECK_FUNCS (See the doc):

AC_CHECK_FUNCS(seteuid, [],
              [AC_MSG_ERROR([This program re quires that seteuid be available])])

Reply via email to