diff options
author | Adam Jackson <ajax@nwnk.net> | 2005-07-08 18:29:58 +0000 |
---|---|---|
committer | Adam Jackson <ajax@nwnk.net> | 2005-07-08 18:29:58 +0000 |
commit | f068c478d0966be93f9e984c1e9ce2600819a6a1 (patch) | |
tree | 069efb79aab28c822302b6741721970c1d359b8b /configure.ac | |
parent | e5f35e324548994f2d6df89d6bd0a4eb913f7414 (diff) |
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/.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 11 |
1 files 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 |