[Fontconfig] fontconfig: Branch 'master'
Akira TAGOH
tagoh at kemper.freedesktop.org
Tue Sep 11 01:59:34 PDT 2012
configure.ac | 15 ++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)
New commits:
commit ab26a722c05b43468f838b2fa72bb6ccd0408ac8
Author: Akira TAGOH <akira at tagoh.org>
Date: Fri Aug 31 15:10:50 2012 +0900
Bug 52573 - patch required to build 2.10.x with oldish GNU C library headers
On older libc, _POSIX_C_SOURCE didn't satisfy to use posix_fadvise()
and AC_CHECK_FUNCS doesn't check a header file if the function is
declared there properly. so use AC_LINK_IFELSE instead.
diff --git a/configure.ac b/configure.ac
index 1270ba5..d27dba1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -136,7 +136,20 @@ AC_TYPE_PID_T
# Checks for library functions.
AC_FUNC_VPRINTF
AC_FUNC_MMAP
-AC_CHECK_FUNCS([geteuid getuid link memmove memset mkstemp strchr strrchr strtol getopt getopt_long sysconf ftruncate chsize rand random lrand48 random_r rand_r regcomp regerror regexec regfree posix_fadvise fstatvfs fstatfs])
+AC_CHECK_FUNCS([geteuid getuid link memmove memset mkstemp strchr strrchr strtol getopt getopt_long sysconf ftruncate chsize rand random lrand48 random_r rand_r regcomp regerror regexec regfree fstatvfs fstatfs])
+
+dnl AC_CHECK_FUNCS doesn't check for header files.
+dnl posix_fadvise() may be not available in older libc.
+AC_MSG_CHECKING([for posix_fadvise])
+AC_LINK_IFELSE([AC_LANG_SOURCE([[
+ #include <fcntl.h>
+ int main(void) {
+ return posix_fadvise(0, 0, 0, 0);
+ }
+ ]])],[
+ AC_MSG_RESULT([yes])
+ AC_DEFINE([HAVE_POSIX_FADVISE], [1], [Define to 1 if you have the `posix_fadvise' function.])
+ ],[AC_MSG_RESULT([no])])
#
if test "x$ac_cv_func_fstatvfs" = "xyes"; then
More information about the Fontconfig
mailing list