Code

Fix check for htonll in configure.ac
authorManuel Luis Sanmartin Rozada <manuel.luis@gmail.com>
Mon, 31 Mar 2014 19:08:05 +0000 (21:08 +0200)
committerMarc Fournier <marc.fournier@camptocamp.com>
Wed, 7 Jan 2015 22:32:03 +0000 (23:32 +0100)
configure.in

index f6203d981285f3063c680bb1a9db2175e9ec9882..c2d577478167b115841387501698d79d61555ae1 100644 (file)
@@ -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 <sys/types.h>
 #include <netinet/in.h>
@@ -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],