summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorAntoine Jacoutot <ajacoutot@gnome.org>2015-07-19 02:19:08 +0200
committerMiloslav Trmač <mitr@redhat.com>2015-07-20 21:38:50 +0200
commit074df27827fd773f1c76545cd08da568440ca41f (patch)
treee0552a10b66f8a9e89dfd74745f3274c0c7ae2ec /configure.ac
parent28a6e624c3753e30d35462f7417afae986a582a2 (diff)
downloadpolkit-074df27827fd773f1c76545cd08da568440ca41f.tar.gz
Add support for OpenBSD
- OpenBSD does not use PAM nor SHADOW but bsd_auth(3) for authentication - get_kinfo_proc(): adapt FreeBSD code to OpenBSD - OpenBSD, get/setnetgrent are defined in netgroup.h and getnetgrent(3) takes a const char https://bugs.freedesktop.org/show_bug.cgi?id=75187
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac21
1 files changed, 17 insertions, 4 deletions
diff --git a/configure.ac b/configure.ac
index b9b64d0..85f26b9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -167,11 +167,15 @@ fi
dnl ---------------------------------------------------------------------------
dnl - Check whether setnetgrent has a return value
dnl ---------------------------------------------------------------------------
+AC_CHECK_HEADERS([netgroup.h])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
- #include <stddef.h>
- #include <netdb.h>
-]], [[
- int r = setnetgrent (NULL);]])],
+ #include <stddef.h>
+ #ifdef HAVE_NETGROUP_H
+ #include <netgroup.h>
+ #else
+ #include <netdb.h>
+ #endif
+]], [[int r = setnetgrent (NULL);]])],
[AC_DEFINE([HAVE_SETNETGRENT_RETURN], 1, [Define to 1 if setnetgrent has return value])])
dnl ---------------------------------------------------------------------------
@@ -318,6 +322,11 @@ case $POLKIT_AUTHFW in
AC_DEFINE(POLKIT_AUTHFW_SHADOW, 1, [If using the Shadow authentication framework])
;;
+ bsdauth)
+ need_pam=no
+ AC_DEFINE(POLKIT_AUTHFW_BSDAUTH, 1, [If using the bsd_auth(3) authentication framework])
+ ;;
+
*)
AC_MSG_ERROR([Unknown Authentication Framework: $POLKIT_AUTHFW])
;;
@@ -326,6 +335,7 @@ esac
AM_CONDITIONAL(POLKIT_AUTHFW_NONE, [test x$POLKIT_AUTHFW = xnone], [Using no authfw])
AM_CONDITIONAL(POLKIT_AUTHFW_PAM, [test x$POLKIT_AUTHFW = xpam], [Using PAM authfw])
AM_CONDITIONAL(POLKIT_AUTHFW_SHADOW, [test x$POLKIT_AUTHFW = xshadow], [Using Shadow authfw])
+AM_CONDITIONAL(POLKIT_AUTHFW_BSDAUTH, [test x$POLKIT_AUTHFW = xbsdauth], [Using bsd_auth(3) authfw])
dnl ---------------------------------------------------------------------------
@@ -505,6 +515,9 @@ case "$host_os" in
*freebsd*)
AC_DEFINE([HAVE_FREEBSD], 1, [Is this a FreeBSD system?])
;;
+ *openbsd*)
+ AC_DEFINE([HAVE_OPENBSD], 1, [Is this an OpenBSD system?])
+ ;;
esac
GOBJECT_INTROSPECTION_CHECK([0.6.2])