diff options
author | Ting-Wei Lan <lantw44@gmail.com> | 2014-01-20 15:34:53 +0800 |
---|---|---|
committer | Colin Walters <walters@verbum.org> | 2014-02-18 19:25:41 -0500 |
commit | 815dfc64d40cb0267cb96701409c04b4196e508a (patch) | |
tree | a3a10fd9895926609c3c76fca0cf1d7046ddfd57 /configure.ac | |
parent | fb0d00225c401a521430ddf232a11965cdc5dd44 (diff) | |
download | polkit-815dfc64d40cb0267cb96701409c04b4196e508a.tar.gz |
build: Fix several issues on FreeBSD
1. Fallback to fsync() if fdatasync() is not available.
2. Check whether setnetgrent() has a return value.
3. Check whether the system has SIGPOLL.
4. Add configure option to disable test. mocklibc cannot be built on FreeBSD
because of function prototype conflict.
https://bugs.freedesktop.org/show_bug.cgi?id=73821
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac index 2128263..a7b0148 100644 --- a/configure.ac +++ b/configure.ac @@ -158,13 +158,32 @@ AC_CHECK_LIB(expat,XML_ParserCreate,[EXPAT_LIBS="-lexpat"], [AC_MSG_ERROR([Can't find expat library. Please install expat.])]) AC_SUBST(EXPAT_LIBS) -AC_CHECK_FUNCS(clearenv) +AC_CHECK_FUNCS(clearenv fdatasync) if test "x$GCC" = "xyes"; then LDFLAGS="-Wl,--as-needed $LDFLAGS" fi dnl --------------------------------------------------------------------------- +dnl - Check whether setnetgrent has a return value +dnl --------------------------------------------------------------------------- +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ + #include <stddef.h> + #include <netdb.h> +]], [[ + int r = setnetgrent (NULL);]])], +[AC_DEFINE([HAVE_SETNETGRENT_RETURN], 1, [Define to 1 if setnetgrent has return value])]) + +dnl --------------------------------------------------------------------------- +dnl - Check whether we want to build test +dnl --------------------------------------------------------------------------- +AC_ARG_ENABLE([test], + [AS_HELP_STRING([--disable-test], [Do not build tests])], + [enable_test=$enableval], [enable_test=yes]) + +AM_CONDITIONAL(BUILD_TEST, [test "x$enable_test" = "xyes"]) + +dnl --------------------------------------------------------------------------- dnl - Select wether to use libsystemd-login or ConsoleKit for session tracking dnl --------------------------------------------------------------------------- |