From 7e866336a157b26d608337464c387e9aa5494230 Mon Sep 17 00:00:00 2001 From: Manuel Luis Sanmartin Rozada Date: Mon, 31 Mar 2014 21:08:05 +0200 Subject: [PATCH] Fix check for htonll in configure.ac --- configure.in | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/configure.in b/configure.in index f6203d98..c2d57747 100644 --- a/configure.in +++ b/configure.in @@ -1214,10 +1214,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 @@ -1229,12 +1228,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], -- 2.11.0