X-Git-Url: https://git.distorted.org.uk/~mdw/catacomb/blobdiff_plain/baf5b59c8aad82395688f0a96efcfba4e16b8fc2..c0f640586df9e46a95d2aeb71ce39c934d17a3dc:/configure.ac diff --git a/configure.ac b/configure.ac index 631f7838..3c8cb375 100644 --- a/configure.ac +++ b/configure.ac @@ -139,6 +139,8 @@ AC_CHECK_FUNCS([getauxval]) dnl-------------------------------------------------------------------------- dnl C programming environment. +CATACOMB_LIBS= + dnl Find out if we're cross-compiling. AM_CONDITIONAL([CROSS_COMPILING], [test "$cross_compiling" = yes]) @@ -222,6 +224,14 @@ AC_SUBST([limits]) dnl Functions used for noise-gathering. AC_CHECK_FUNCS([setgroups]) AC_CHECK_HEADERS([linux/random.h]) +mdw_ORIG_LIBS=$LIBS LIBS=$CATACOMB_LIBS +AC_SEARCH_LIBS([clock_gettime], [rt]) +CATACOMB_LIBS=$LIBS LIBS=$mdw_ORIG_LIBS +if test $ac_cv_search_clock_gettime != no; then + AC_DEFINE([HAVE_CLOCK_GETTIME], [1], + [Define if you have the \`clock_gettime' function.]) +fi +AC_CHECK_FUNCS([getentropy]) AC_CACHE_CHECK([whether the freewheel noise generator will work], [catacomb_cv_freewheel], [AC_TRY_LINK( @@ -249,6 +259,9 @@ LIBS=$mdw_ORIG_LIBS dnl Memory locking support. AC_CHECK_FUNCS([mlock]) +dnl Set the master libraries we need. +AC_SUBST([CATACOMB_LIBS]) + dnl Necessary support libraries. PKG_CHECK_MODULES([mLib], [mLib >= 2.2.2.1]) AM_CFLAGS="$AM_CFLAGS $mLib_CFLAGS"