X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=m4%2Fsetsockopt.m4;h=e37fe2ae7c0e9b0df3e3d2081af6dc1bea628ca7;hb=15b71a80142a85eb34afbad016a23bb591145f36;hp=4ca7214cff9595dd1d6c1342f5b1e8809e3b2881;hpb=717020b76aacd61929bf78ee6e8d838f619016f1;p=awesomized%2Flibmemcached diff --git a/m4/setsockopt.m4 b/m4/setsockopt.m4 index 4ca7214c..e37fe2ae 100644 --- a/m4/setsockopt.m4 +++ b/m4/setsockopt.m4 @@ -1,15 +1,16 @@ dnl --------------------------------------------------------------------------- -dnl Macro: SETSOCKOPT_TEST +dnl Macro: SETSOCKOPT_SANITY dnl --------------------------------------------------------------------------- -AC_LANG(C) -AC_RUN_IFELSE([ - AC_LANG_PROGRAM([ +AC_DEFUN([SETSOCKOPT_SANITY],[ + AC_LANG_PUSH([C]) + AC_RUN_IFELSE([ + AC_LANG_PROGRAM([[ #include #include #include #include #include - ], [ + ]],[[ int sock = socket(AF_INET, SOCK_STREAM, 0); struct timeval waittime; @@ -23,17 +24,17 @@ AC_RUN_IFELSE([ } } return 0; - ]) - ], AC_DEFINE(HAVE_SNDTIMEO, 1, [Define to 1 if you have a working SO_SNDTIMEO])) + ]])], + [AC_DEFINE(HAVE_SNDTIMEO, 1, [Define to 1 if you have a working SO_SNDTIMEO])]) -AC_RUN_IFELSE([ - AC_LANG_PROGRAM([ + AC_RUN_IFELSE([ + AC_LANG_PROGRAM([[ #include #include #include #include #include - ], [ + ]],[[ int sock = socket(AF_INET, SOCK_STREAM, 0); struct timeval waittime; @@ -47,9 +48,10 @@ AC_RUN_IFELSE([ } } return 0; - ]) - ], AC_DEFINE(HAVE_RCVTIMEO, 1, [Define to 1 if you have a working SO_RCVTIMEO])) + ]])], [AC_DEFINE(HAVE_RCVTIMEO, 1, [Define to 1 if you have a working SO_RCVTIMEO])]) + AC_LANG_POP +]) dnl --------------------------------------------------------------------------- -dnl End Macro: SETSOCKOPT_TEST +dnl End Macro: SETSOCKOPT_SANITY dnl ---------------------------------------------------------------------------