summaryrefslogtreecommitdiffstats
path: root/tdesu/configure.in.in
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-11-06 15:56:34 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-11-06 15:56:34 -0600
commitb529f046c9a64ac5fcfa60747af940cf972b3ebc (patch)
tree83c28cf7fa8fed1960ebd3924b579e7ed8c95cc6 /tdesu/configure.in.in
parent6508fe4c40c60fd7a43bd3d9e19b762e10ea3f53 (diff)
downloadtdebase-b529f046c9a64ac5fcfa60747af940cf972b3ebc.tar.gz
tdebase-b529f046c9a64ac5fcfa60747af940cf972b3ebc.zip
Actually move the kde files that were renamed in the last commit
Diffstat (limited to 'tdesu/configure.in.in')
-rw-r--r--tdesu/configure.in.in62
1 files changed, 62 insertions, 0 deletions
diff --git a/tdesu/configure.in.in b/tdesu/configure.in.in
new file mode 100644
index 000000000..512825786
--- /dev/null
+++ b/tdesu/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-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])