diff options
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index bab7d89bd..0ab756dc7 100644 --- a/configure.ac +++ b/configure.ac @@ -223,6 +223,24 @@ AC_REPLACE_FUNCS([reallocarray strcasecmp strcasestr strlcat strlcpy strndup]) AC_CHECK_DECLS([program_invocation_short_name], [], [], [[#include <errno.h>]]) +dnl Check for SO_PEERCRED #define +AC_CACHE_CHECK([for SO_PEERCRED in sys/socket.h], + [xorg_cv_sys_have_so_peercred], + [AC_EGREP_CPP(yes_have_so_peercred,[ +#include <sys/types.h> +#include <sys/socket.h> +#ifdef SO_PEERCRED +yes_have_so_peercred +#endif +], + [xorg_cv_sys_have_so_peercred=yes], + [xorg_cv_sys_have_so_peercred=no])]) + +dnl define NO_LOCAL_CLIENT_CRED if no getpeereid, getpeerucred or SO_PEERCRED +if test "x$ac_cv_func_getpeereid" = xno && test "x$ac_cv_func_getpeerucred" = xno && test "x$xorg_cv_sys_have_so_peercred" = xno ; then + AC_DEFINE([NO_LOCAL_CLIENT_CRED], 1, [Define to 1 if no local socket credentials interface exists]) +fi + dnl Find the math libary, then check for cbrt function in it. AC_CHECK_LIB(m, sqrt) AC_CHECK_FUNCS([cbrt]) |