summaryrefslogtreecommitdiffstats
path: root/kdesu/configure.in.in
blob: 51282578691f61cd349100916292510691bbf1be (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
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)

AC_ARG_WITH(sudo-tdesu-backend,
	    AC_HELP_STRING([--with-sudo-tdesu-backend],
			   [use sudo as backend for tdesu (default is su)]),
[
    if test x$withval = xyes; then
        use_tdesu_backend="sudo"
    else
        use_tdesu_backend="su"
    fi
],
    use_tdesu_backend="su"
)

AC_DEFINE_UNQUOTED(DEFAULT_SUPER_USER_COMMAND, "$use_tdesu_backend", [Use su or sudo])