X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=m4%2Fax_libevent.m4;h=c576bad5f082d703c11d41306aa19933c9c6dd39;hb=4952d9d842e9c13eace3a986bf748001d5d6852d;hp=686bff23aa9d5da071bd4180a2d8bc4cb9d67c04;hpb=ac46009041afe0134d3719e7ab6bc467d136ac0b;p=awesomized%2Flibmemcached diff --git a/m4/ax_libevent.m4 b/m4/ax_libevent.m4 index 686bff23..c576bad5 100644 --- a/m4/ax_libevent.m4 +++ b/m4/ax_libevent.m4 @@ -20,7 +20,7 @@ # and this notice are preserved. This file is offered as-is, without any # warranty. -#serial 4 +#serial 5 AC_DEFUN([AX_LIBEVENT], [AC_PREREQ([2.63])dnl @@ -28,15 +28,15 @@ AC_DEFUN([AX_LIBEVENT], [AX_SAVE_FLAGS LIBS="-levent $LIBS" AC_LANG_PUSH([C]) - AC_RUN_IFELSE([AC_LANG_PROGRAM([ + AC_RUN_IFELSE([AC_LANG_PROGRAM([[ #include #include #include #include - ],[ + ]],[[ struct event_base *tmp_event= event_init(); event_base_free(tmp_event); - ])], + ]])], [ax_cv_libevent=yes], [ax_cv_libevent=no], [AC_MSG_WARN([test program execution failed])]) @@ -62,15 +62,15 @@ AC_DEFUN([AX_LIBEVENT2], [AX_SAVE_FLAGS LIBS="-levent $LIBS" AC_LANG_PUSH([C]) - AC_RUN_IFELSE([AC_LANG_PROGRAM([ + AC_RUN_IFELSE([AC_LANG_PROGRAM([[ #include #include #include #include - ],[ - struct event_base *tmp_event= event_init(); - event_base_free(tmp_event); - ])], + ]],[[ + struct event_base *___event_base= event_base_new(); + event_base_free(___event_base); + ]])], [ax_cv_libevent2=yes], [ax_cv_libevent2=no], [AC_MSG_WARN([test program execution failed])]) @@ -97,16 +97,18 @@ AC_DEFUN([AX_LIBEVENT2_EVHTTP], [AX_SAVE_FLAGS LIBS="-levent $LIBS" AC_LANG_PUSH([C]) - AC_RUN_IFELSE([AC_LANG_PROGRAM([ + AC_RUN_IFELSE([AC_LANG_PROGRAM([[ #include #include #include #include #include - ],[ - struct event_base *libbase= event_base_new(); - struct evhttp *libsrvr= evhttp_new(libbase); - ])], + ]],[[ + struct event_base *___event_base= event_base_new(); + struct evhttp *___evhttp= evhttp_new(___event_base); + evhttp_free(___evhttp); + event_base_free(___event_base); + ]])], [ax_cv_libevent2_evhttp=yes], [ax_cv_libevent2_evhttp=no], [AC_MSG_WARN([test program execution failed])])