summaryrefslogtreecommitdiff
path: root/sysutils/policykit/files/patch-configure.in
blob: 051789d413f187ee6ef6a3cd5eaccbb8104bd227 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
--- configure.in.orig	2008-04-08 16:22:34.000000000 -0400
+++ configure.in	2008-04-18 02:09:19.000000000 -0400
@@ -179,7 +179,7 @@ PKG_CHECK_MODULES(DBUS_GLIB, [dbus-glib-
 AC_SUBST(DBUS_GLIB_CFLAGS)
 AC_SUBST(DBUS_GLIB_LIBS)
 
-AC_CHECK_FUNCS(getgrouplist)
+AC_CHECK_FUNCS(getgrouplist readdir64 getline strndup clearenv)
 
 EXPAT_LIB=""
 AC_ARG_WITH(expat, [  --with-expat=<dir>      Use expat from here],
@@ -471,7 +471,8 @@ AM_CONDITIONAL(OS_TYPE_RED_HAT, test x$w
 AM_CONDITIONAL(OS_TYPE_SUSE, test x$with_os_type = xsuse, [Running on SUSE OS'es])
 AM_CONDITIONAL(OS_TYPE_GENTOO, test x$with_os_type = xgentoo, [Running on Gentoo OS'es])
 AM_CONDITIONAL(OS_TYPE_PARDUS, test x$with_os_type = xpardus, [Running on Pardus OS'es])
-AM_CONDITIONAL(OS_TYPE_SALARIS, test x$with_os_type = xsolaris, [Running os Solaris OS'es])
+AM_CONDITIONAL(OS_TYPE_SOLARIS, test x$with_os_type = xsolaris, [Running os Solaris OS'es])
+AM_CONDITIONAL(OS_TYPE_FREEBSD, test x$with_os_type = xfreebsd, [Running on FreeBSD OS'es])
 
 AC_ARG_WITH(pam-include, [  --with-pam-include=<file>  pam file to include])
 
@@ -491,6 +492,11 @@ elif test x$with_os_type = xsuse -o x$wi
    PAM_FILE_INCLUDE_ACCOUNT=common-account
    PAM_FILE_INCLUDE_PASSWORD=common-password
    PAM_FILE_INCLUDE_SESSION=common-session
+elif test x$with_os_type = xfreebsd ; then
+    PAM_FILE_INCLUDE_AUTH=system
+    PAM_FILE_INCLUDE_ACCOUNT=system
+    PAM_FILE_INCLUDE_PASSWORD=system
+    PAM_FILE_INCLUDE_SESSION=system
 else
    PAM_FILE_INCLUDE_AUTH=system-auth
    PAM_FILE_INCLUDE_ACCOUNT=system-auth
@@ -516,8 +522,30 @@ case "$host_os" in
   *solaris*)
 	AC_DEFINE([HAVE_SOLARIS], 1, [Is this a Solaris system?])
 	;;
+  *freebsd*)
+  	AC_DEFINE([HAVE_FREEBSD], 1, [Is this a FreeBSD system?])
+	;;
 esac
 
+have_inotify=no
+AC_CHECK_HEADERS([linux/inotify.h], [have_inotify=yes])
+AC_CHECK_HEADERS([sys/inotify.h], [have_inotify=yes])
+
+AM_CONDITIONAL(HAVE_INOTIFY, test "x$have_inotify" = "xyes")
+
+if test "x$have_inotify" = "xyes" ; then
+    AC_DEFINE([HAVE_INOTIFY], 1, [Enable Linux inotify() usage])
+fi
+
+have_kqueue=yes
+AC_CHECK_FUNCS([kqueue],,have_kqueue=no)
+
+AM_CONDITIONAL(HAVE_KQUEUE, test "x$have_kqueue" = "xyes")
+
+if test "x$have_kqueue" = "xyes" ; then
+    AC_DEFINE([HAVE_KQUEUE], 1, [Enable BSD kqueue() usage])
+fi
+
 # ********************
 # Internationalisation
 # ********************