TDE base libraries and programs
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.

configure.in.in 1.3KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. dnl Check for "struct ucred"
  2. AC_MSG_CHECKING("struct ucred")
  3. AC_TRY_COMPILE(
  4. [
  5. #define _GNU_SOURCE 1
  6. #include <sys/socket.h>
  7. ],
  8. [
  9. struct ucred red;
  10. ], have_ucred=yes
  11. , have_ucred=no
  12. )
  13. if test "$have_ucred" = "yes"; then
  14. AC_DEFINE(HAVE_STRUCT_UCRED, 1, [Define if you have the struct ucred])
  15. AC_MSG_RESULT(yes)
  16. else
  17. AC_MSG_RESULT(no)
  18. fi
  19. dnl Check for the group "nogroup" or "nobody" Use -2 otherwise.
  20. AC_MSG_CHECKING(nogroup)
  21. AC_TRY_RUN([
  22. #include <grp.h>
  23. #include <sys/types.h>
  24. int main()
  25. {
  26. struct group *grp = getgrnam("nogroup");
  27. if (grp) return 0;
  28. return 1;
  29. }
  30. ], nogroup=nogroup,
  31. AC_TRY_RUN([
  32. #include <grp.h>
  33. #include <sys/types.h>
  34. int main()
  35. {
  36. struct group *grp = getgrnam("nobody");
  37. if (grp) return 0;
  38. return 1;
  39. }
  40. ], nogroup=nobody,
  41. nogroup=65534, nogroup=65534), nogroup=65534)
  42. AC_MSG_RESULT($nogroup)
  43. AC_SUBST(nogroup)
  44. AC_CHECK_FUNCS(getpeereid)
  45. AC_ARG_WITH(sudo-tdesu-backend,
  46. AC_HELP_STRING([--with-sudo-tdesu-backend],
  47. [use sudo as backend for tdesu (default is su)]),
  48. [
  49. if test x$withval = xyes; then
  50. use_tdesu_backend="sudo"
  51. else
  52. use_tdesu_backend="su"
  53. fi
  54. ],
  55. use_tdesu_backend="su"
  56. )
  57. AC_DEFINE_UNQUOTED(DEFAULT_SUPER_USER_COMMAND, "$use_tdesu_backend", [Use su or sudo])