File: pandora_fdatasync.m4

package info (click to toggle)
libmemcached 1.0.8-1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 7,912 kB
  • sloc: cpp: 39,309; ansic: 18,449; sh: 11,864; python: 603; yacc: 437; lex: 195; makefile: 116
file content (25 lines) | stat: -rw-r--r-- 858 bytes parent folder | download | duplicates (5)
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
dnl  Copyright (C) 2009 Sun Microsystems, Inc.
dnl This file is free software; Sun Microsystems, Inc.
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.

#--------------------------------------------------------------------
# Check for a working fdatasync call
#--------------------------------------------------------------------


AC_DEFUN([PANDORA_WORKING_FDATASYNC],[
  AC_CACHE_CHECK([working fdatasync],[ac_cv_func_fdatasync],[
    AC_LANG_PUSH(C++)
    AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#include <unistd.h>
      ]],[[
fdatasync(4);
      ]])],
    [ac_cv_func_fdatasync=yes],
    [ac_cv_func_fdatasync=no])
    AC_LANG_POP()
  ])
  AS_IF([test "x${ac_cv_func_fdatasync}" = "xyes"],
    [AC_DEFINE([HAVE_FDATASYNC],[1],[If the system has a working fdatasync])])
])