2014-03-15 18:25:17 +01:00
|
|
|
# Check if "struct ucred" is available.
|
2008-10-16 14:59:26 +02:00
|
|
|
#
|
2017-01-17 11:54:55 +01:00
|
|
|
# Author: Max Kellermann <max.kellermann@gmail.com>
|
2008-10-16 14:59:26 +02:00
|
|
|
|
|
|
|
AC_DEFUN([STRUCT_UCRED],[
|
|
|
|
AC_MSG_CHECKING([for struct ucred])
|
|
|
|
AC_CACHE_VAL(mpd_cv_have_struct_ucred, [
|
|
|
|
AC_TRY_COMPILE([#include <sys/socket.h>],
|
|
|
|
[struct ucred cred;],
|
|
|
|
mpd_cv_have_struct_ucred=yes,
|
|
|
|
mpd_cv_have_struct_ucred=no)
|
|
|
|
])
|
|
|
|
|
|
|
|
AC_MSG_RESULT($mpd_cv_have_struct_ucred)
|
|
|
|
if test x$mpd_cv_have_struct_ucred = xyes; then
|
|
|
|
AC_DEFINE(HAVE_STRUCT_UCRED, 1, [Define if struct ucred is present from sys/socket.h])
|
|
|
|
fi
|
|
|
|
])
|