~brianaker/libmemcached/1164440

« back to all changes in this revision

Viewing changes to m4/socket_send_flags.m4

  • Committer: Continuous Integration
  • Date: 2012-10-22 05:56:09 UTC
  • mfrom: (1086.1.8 libmemcached-1.0)
  • Revision ID: ci@tangent.org-20121022055609-cbooaw9bcdal4qge
Merge lp:~tangent-org/libmemcached/1.0-build Build: jenkins-Libmemcached-1.0-87

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
dnl  Copyright (C) 2012 Data Differential LLC
2
 
dnl  Copyright (C) 2011 Trond Norbye
 
1
dnl Copyright (C) 2012 Data Differential LLC
 
2
dnl Copyright (C) 2011 Trond Norbye
3
3
dnl This file is free software; Trond Norbye
4
4
dnl gives unlimited permission to copy and/or distribute it,
5
5
dnl with or without modifications, as long as this notice is preserved.
7
7
dnl Macro: SOCKET_SEND_FLAGS
8
8
dnl ---------------------------------------------------------------------------
9
9
 
10
 
AC_DEFUN([SOCKET_SEND_FLAGS],
11
 
[
 
10
AC_DEFUN([SOCKET_SEND_FLAGS],[
12
11
  AC_CACHE_CHECK([for MSG_NOSIGNAL], [ac_cv_msg_nosignal], [
13
12
    AC_LANG_PUSH([C])
14
 
    save_CFLAGS="$CFLAGS"
 
13
    AX_SAVE_FLAGS
15
14
    CFLAGS="$CFLAGS -I${srcdir}"
16
15
 
17
16
    AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <netdb.h>], [ int flags= MSG_NOSIGNAL ])], [ac_cv_msg_nosignal="yes"])
18
17
    AC_LANG_POP
19
 
    CFLAGS="$save_CFLAGS"
 
18
    AX_RESTORE_FLAGS
20
19
  ])
21
20
 
22
21
  AC_CACHE_CHECK([for MSG_DONTWAIT], [ac_cv_msg_dontwait], [
23
22
    AC_LANG_PUSH([C])
24
 
    save_CFLAGS="$CFLAGS"
 
23
    AX_SAVE_FLAGS
25
24
    CFLAGS="$CFLAGS -I${srcdir}"
26
25
 
27
26
    AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <netdb.h>], [ int flags= MSG_DONTWAIT ])], [ac_cv_msg_dontwait="yes"])
28
27
    AC_LANG_POP
29
 
    CFLAGS="$save_CFLAGS"
 
28
    AX_RESTORE_FLAGS
30
29
  ])
31
30
 
32
31
  AC_CACHE_CHECK([for MSG_MORE], [ac_cv_msg_more], [
33
32
    AC_LANG_PUSH([C])
34
 
    save_CFLAGS="$CFLAGS"
 
33
    AX_SAVE_FLAGS
35
34
    CFLAGS="$CFLAGS -I${srcdir}"
36
35
 
37
36
    AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <netdb.h>], [ int flags= MSG_MORE ])], [ac_cv_msg_more="yes"])
38
37
    AC_LANG_POP
39
 
    CFLAGS="$save_CFLAGS"
 
38
    AX_RESTORE_FLAGS
40
39
  ])
41
40
 
42
41
  AS_IF([test "x$ac_cv_msg_nosignal" = "xyes"],[ AC_DEFINE(HAVE_MSG_NOSIGNAL, 1, [Define to 1 if you have a MSG_NOSIGNAL])])