X-Git-Url: https://git.distorted.org.uk/~mdw/mLib/blobdiff_plain/892da3f95f86d8c0dcf2d97b988b5583b1d5ca35..d056fbdff1c5a26be055c38eee4c273ee6a0cba7:/configure.ac diff --git a/configure.ac b/configure.ac index 9ff83ba..094757c 100644 --- a/configure.ac +++ b/configure.ac @@ -36,13 +36,13 @@ mdw_SILENT_RULES AC_PROG_CC AM_PROG_CC_C_O -AM_PROG_LIBTOOL +LT_INIT AX_CFLAGS_WARN_ALL mdw_LIBTOOL_VERSION_INFO AC_CHECK_PROGS([AUTOM4TE], [autom4te]) -mdw_MANEXT +mdw_MANEXT([mLib]) AC_DEFINE_UNQUOTED([SRCDIR], ["$(cd $srcdir && pwd)"], [absolute pathname for the source directory.]) @@ -50,13 +50,18 @@ AC_DEFINE_UNQUOTED([SRCDIR], ["$(cd $srcdir && pwd)"], dnl-------------------------------------------------------------------------- dnl C programming environment. +MLIB_LIBS= + dnl Headers. AC_CHECK_HEADERS([float.h]) AC_CHECK_HEADERS([stdint.h]) dnl Libraries. +mdw_ORIG_LIBS=$LIBS LIBS=$MLIB_LIBS +AC_SEARCH_LIBS([sqrt], [m]) AC_SEARCH_LIBS([socket], [socket]) AC_SEARCH_LIBS([gethostbyname], [nsl resolv]) +MLIB_LIBS=$LIBS LIBS=$mdw_ORIG_LIBS dnl Functions. AC_CHECK_FUNCS([snprintf]) @@ -78,6 +83,9 @@ AC_CHECK_MEMBERS([struct msgdr.msg_control],,, [ dnl Find out whether we're cross-compiling. AM_CONDITIONAL([CROSS_COMPILING], [test "$cross_compiling" = yes]) +dnl Set the master library list. +AC_SUBST([MLIB_LIBS]) + dnl-------------------------------------------------------------------------- dnl Name resolution. @@ -87,10 +95,12 @@ AC_ARG_WITH([adns], [want_adns=$withval], [want_adns=auto]) +mdw_ORIG_LIBS=$LIBS LIBS=$MLIB_LIBS case $want_adns in no) ;; *) AC_SEARCH_LIBS([adns_init], [adns], [have_adns=yes], [have_adns=no]) ;; esac +MLIB_LIBS=$LIBS LIBS=$mdw_ORIG_LIBS case $want_adns,$have_adns in yes,no) AC_MSG_ERROR([ADNS library not found but explicitly requested]) @@ -112,6 +122,19 @@ esac AM_CONDITIONAL([WITH_ADNS], [test "$use_adns" = yes]) dnl-------------------------------------------------------------------------- +dnl Timers. + +AC_CHECK_HEADERS([linux/perf_event.h]) + +mdw_ORIG_LIBS=$LIBS LIBS=$MLIB_LIBS +AC_SEARCH_LIBS([clock_gettime], [rt]) +MLIB_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 + +dnl-------------------------------------------------------------------------- dnl Python (used for testing). AM_PATH_PYTHON([2.4],, [:]) @@ -119,7 +142,7 @@ AM_PATH_PYTHON([2.4],, [:]) dnl-------------------------------------------------------------------------- dnl Output. -AC_CONFIG_HEADER([config/config.h]) +AC_CONFIG_HEADERS([config/config.h]) AC_CONFIG_TESTDIR([t]) AC_CONFIG_FILES(