summaryrefslogtreecommitdiffstats
path: root/kdesu/configure.in.in
diff options
context:
space:
mode:
authortoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
committertoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
commit4aed2c8219774f5d797760606b8489a92ddc5163 (patch)
tree3f8c130f7d269626bf6a9447407ef6c35954426a /kdesu/configure.in.in
downloadtdebase-4aed2c8219774f5d797760606b8489a92ddc5163.tar.gz
tdebase-4aed2c8219774f5d797760606b8489a92ddc5163.zip
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kdesu/configure.in.in')
-rw-r--r--kdesu/configure.in.in62
1 files changed, 62 insertions, 0 deletions
diff --git a/kdesu/configure.in.in b/kdesu/configure.in.in
new file mode 100644
index 000000000..5c0798344
--- /dev/null
+++ b/kdesu/configure.in.in
@@ -0,0 +1,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-kdesu-backend,
+ AC_HELP_STRING([--with-sudo-kdesu-backend],
+ [use sudo as backend for kdesu (default is su)]),
+[
+ if test x$withval = xyes; then
+ use_kdesu_backend="sudo"
+ else
+ use_kdesu_backend="su"
+ fi
+],
+ use_kdesu_backend="su"
+)
+
+AC_DEFINE_UNQUOTED(DEFAULT_SUPER_USER_COMMAND, "$use_kdesu_backend", [Use su or sudo])