You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
63 lines
1.3 KiB
63 lines
1.3 KiB
15 years ago
|
dnl Check for "struct ucred"
|
||
|
AC_MSG_CHECKING("struct ucred")
|
||
|
AC_TRY_COMPILE(
|
||
|
[
|
||
|
#define _GNU_SOURCE 1
|
||
|
#include <sys/socket.h>
|
||
|
],
|
||
|
[
|
||
|
struct ucred red;
|
||
|
], have_ucred=yes
|
||
|
, have_ucred=no
|
||
|
)
|
||
|
if test "$have_ucred" = "yes"; then
|
||
|
AC_DEFINE(HAVE_STRUCT_UCRED, 1, [Define if you have the struct ucred])
|
||
|
AC_MSG_RESULT(yes)
|
||
|
else
|
||
|
AC_MSG_RESULT(no)
|
||
|
fi
|
||
|
|
||
|
dnl Check for the group "nogroup" or "nobody" Use -2 otherwise.
|
||
|
AC_MSG_CHECKING(nogroup)
|
||
|
AC_TRY_RUN([
|
||
|
#include <grp.h>
|
||
|
#include <sys/types.h>
|
||
|
|
||
|
int main()
|
||
|
{
|
||
|
struct group *grp = getgrnam("nogroup");
|
||
|
if (grp) return 0;
|
||
|
return 1;
|
||
|
}
|
||
|
], nogroup=nogroup,
|
||
|
AC_TRY_RUN([
|
||
|
#include <grp.h>
|
||
|
#include <sys/types.h>
|
||
|
|
||
|
int main()
|
||
|
{
|
||
|
struct group *grp = getgrnam("nobody");
|
||
|
if (grp) return 0;
|
||
|
return 1;
|
||
|
}
|
||
|
], nogroup=nobody,
|
||
|
nogroup=65534, nogroup=65534), nogroup=65534)
|
||
|
AC_MSG_RESULT($nogroup)
|
||
|
AC_SUBST(nogroup)
|
||
|
AC_CHECK_FUNCS(getpeereid)
|
||
|
|
||
13 years ago
|
AC_ARG_WITH(sudo-tdesu-backend,
|
||
|
AC_HELP_STRING([--with-sudo-tdesu-backend],
|
||
|
[use sudo as backend for tdesu (default is su)]),
|
||
15 years ago
|
[
|
||
|
if test x$withval = xyes; then
|
||
13 years ago
|
use_tdesu_backend="sudo"
|
||
15 years ago
|
else
|
||
13 years ago
|
use_tdesu_backend="su"
|
||
15 years ago
|
fi
|
||
|
],
|
||
13 years ago
|
use_tdesu_backend="su"
|
||
15 years ago
|
)
|
||
|
|
||
13 years ago
|
AC_DEFINE_UNQUOTED(DEFAULT_SUPER_USER_COMMAND, "$use_tdesu_backend", [Use su or sudo])
|