From f068c478d0966be93f9e984c1e9ce2600819a6a1 Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Fri, 8 Jul 2005 18:29:58 +0000 Subject: Properly test for the existance of poll(3). Default to using it if it exists; add a flag to disable it if you like going slow. Also s/BULITIN/BUILTIN/. --- configure.ac | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index 6e5f322..ef77910 100644 --- a/configure.ac +++ b/configure.ac @@ -47,7 +47,8 @@ dnl must first be located explicitly. PKG_PROG_PKG_CONFIG # Look for headers -AC_CHECK_HEADERS([endian.h]) +AC_CHECK_HEADERS([endian.h poll.h sys/poll.h]) +AC_CHECK_FUNCS([poll]) # # select libraries to include @@ -118,7 +119,13 @@ if test "x$XFONT_SPEEDO" = xyes; then AC_DEFINE(XFONT_SPEEDO,1,[Support Type 1 font files]) fi -if test "x$XFONT_BULITINS" = xyes -o "x$XFONT_BITMAP" = xyes -o "x$XFONT_FREETYPE" = xyes; then +AC_ARG_ENABLE(poll, [ --disable-poll ], [USE_POLL=$enableval], [USE_POLL=$ac_cv_func_poll]) +AM_CONDITIONAL(USE_POLL, [test "x$USE_POLL" = xyes ]) +if test "x$USE_POLL" = xyes; then + AC_DEFINE(USE_POLL, 1, [Use poll instead of select]) +fi + +if test "x$XFONT_BUILTINS" = xyes -o "x$XFONT_BITMAP" = xyes -o "x$XFONT_FREETYPE" = xyes; then XFONT_FONTFILE=yes else XFONT_FONTFILE=no -- cgit v1.2.3