build: avoid "make sytnax-check" failure
[libguestfs.git] / daemon / configure.ac
index 126e125..b0c7f26 100644 (file)
@@ -19,6 +19,9 @@ AC_INIT([libguestfs-daemon],[1.0.0])
 AC_CONFIG_AUX_DIR([build-aux])
 AM_INIT_AUTOMAKE([foreign])
 
+m4_ifndef([AM_SILENT_RULES], [m4_define([AM_SILENT_RULES],[])])
+AM_SILENT_RULES([yes]) # make --enable-silent-rules the default.
+
 AC_CONFIG_MACRO_DIR([m4])
 
 dnl If the user specified --enable-32bit, then force the C compiler
@@ -61,13 +64,24 @@ if test "x$have_augeas" = "xyes"; then
         AC_DEFINE([HAVE_AUGEAS],[1],[Define to 1 if you have Augeas])
 fi
 
+dnl Check for libselinux (optional).
+AC_CHECK_HEADERS([selinux/selinux.h])
+AC_CHECK_LIB([selinux],[setexeccon],[
+        LIBS="-lselinux $LIBS"
+        have_libselinux="$ac_cv_header_selinux_selinux_h"
+        AC_CHECK_FUNCS([setcon getcon])
+        ],[have_libselinux=no])
+if test "x$have_libselinux" = "xyes"; then
+        AC_DEFINE([HAVE_LIBSELINUX],[1],[Define to 1 if you have libselinux])
+fi
+
 dnl Check for XDR library.
 AC_CHECK_LIB([portablexdr],[xdrmem_create],[],[
         AC_SEARCH_LIBS([xdrmem_create],[rpc xdr nsl])
         ])
 
 dnl Functions which may not be available in older distributions.
-AC_CHECK_FUNCS([futimens listxattr llistxattr getxattr lgetxattr setxattr lsetxattr removexattr lremovexattr])
+AC_CHECK_FUNCS([futimens listxattr llistxattr getxattr lgetxattr setxattr lsetxattr removexattr lremovexattr inotify_init1])
 
 dnl For modified printf, we need glibc either (old-style)
 dnl register_printf_function or (new-style) register_printf_specifier.