Nothing uses this yet. Split out into its own commit for clarity.
This flag is not yet in any released version of adns but as adns
upstream I promise this is how it will be. for my convenience I am
making secnet check for it ahead of its existence in public adns....
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
/* Define to the version of this package. */
#undef PACKAGE_VERSION
+/* Use CLOCK_MONOTONIC and adns_if_monotonic */
+#undef USE_MONOTONIC
+
/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
significant byte first (like Motorola and SPARC, unlike Intel). */
#if defined AC_APPLE_UNIVERSAL_BUILD
$as_echo "$as_me: WARNING: Disabling IPv6 support" >&2;}
fi
+ac_fn_c_check_decl "$LINENO" "adns_if_monotonic" "ac_cv_have_decl_adns_if_monotonic" "
+ # include <sys/types.h>
+ # include <sys/stat.h>
+ # include <stdlib.h>
+ # include <stddef.h>
+ # include <string.h>
+ # include <inttypes.h>
+ # include <stdint.h>
+ # include <unistd.h>
+
+ # include <sys/types.h>
+ # include <sys/stat.h>
+ # include <stdlib.h>
+ # include <stddef.h>
+ # include <string.h>
+ # include <inttypes.h>
+ # include <stdint.h>
+ # include <unistd.h>
+
+
+#include <adns.h>
+
+"
+if test "x$ac_cv_have_decl_adns_if_monotonic" = xyes; then :
+
+
+$as_echo "#define USE_MONOTONIC 1" >>confdefs.h
+
+
+else
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Using non-monotonic clock, due to lack of adns_if_monotonic" >&5
+$as_echo "$as_me: WARNING: Using non-monotonic clock, due to lack of adns_if_monotonic" >&2;}
+
+fi
+
+
_SUBDIRMK_MAKEFILES="$_SUBDIRMK_MAKEFILES common.make"
AC_MSG_WARN([Disabling IPv6 support])
fi
+AC_CHECK_DECL([adns_if_monotonic],[
+ AC_DEFINE([USE_MONOTONIC],[1],[Use CLOCK_MONOTONIC and adns_if_monotonic])
+],[
+ AC_MSG_WARN([Using non-monotonic clock, due to lack of adns_if_monotonic])
+],[AC_INCLUDES_DEFAULT
+#include <adns.h>
+])
+
SUBDIRMK_MAKEFILES(common.make)
AC_OUTPUT(,