From: Manuel Luis Sanmartin Rozada Date: Mon, 31 Mar 2014 19:08:05 +0000 (+0200) Subject: Fix check for htonll in configure.ac X-Git-Tag: collectd-5.4.2~28 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=1a822486f40287f552890a553181fd620c662ada;p=collectd.git Fix check for htonll in configure.ac --- diff --git a/configure.ac b/configure.ac index 7029e1e4..1399e79a 100644 --- a/configure.ac +++ b/configure.ac @@ -1207,10 +1207,9 @@ if test "x$have_getmntent" = "xgen"; then fi # Check for htonll -AC_MSG_CHECKING([if have htonll defined]) - - have_htonll="no" - AC_LINK_IFELSE([AC_LANG_PROGRAM( +AC_CACHE_CHECK([if have htonll defined], + [c_cv_have_htonll], + AC_LINK_IFELSE([AC_LANG_PROGRAM( [[[ #include #include @@ -1222,12 +1221,14 @@ AC_MSG_CHECKING([if have htonll defined]) return htonll(0); ]]] )], - [ - have_htonll="yes" - AC_DEFINE(HAVE_HTONLL, 1, [Define if the function htonll exists.]) - ]) - -AC_MSG_RESULT([$have_htonll]) + [c_cv_have_htonll="yes"], + [c_cv_have_htonll="no"] + ) +) +if test "x$c_cv_have_htonll" = "xyes" +then + AC_DEFINE(HAVE_HTONLL, 1, [Define if the function htonll exists.]) +fi # Check for structures AC_CHECK_MEMBERS([struct if_data.ifi_ibytes, struct if_data.ifi_opackets, struct if_data.ifi_ierrors],