Not only check for poll(), make sure poll.h exists as well

This fixes building ngIRCd on Debian GNU/Linux 1.3 "Bo" :-)
This commit is contained in:
Alexander Barton 2011-11-25 21:56:33 +01:00
parent 9e48f3f8f8
commit 9d348d00d9
1 changed files with 12 additions and 3 deletions

View File

@ -252,13 +252,22 @@ AC_ARG_WITH(poll,
CPPFLAGS="-I$withval/include $CPPFLAGS" CPPFLAGS="-I$withval/include $CPPFLAGS"
LDFLAGS="-L$withval/lib $LDFLAGS" LDFLAGS="-L$withval/lib $LDFLAGS"
fi fi
AC_CHECK_FUNCS(poll, x_io_backend=poll\(\), AC_CHECK_FUNCS(poll,
AC_MSG_ERROR([Can't enable poll IO support!]) AC_CHECK_HEADERS(poll.h,
x_io_backend=poll\(\),
AC_MSG_ERROR(
[Can't enable poll IO support!])
,
AC_MSG_ERROR(
[Can't enable poll IO support!])
)
) )
fi fi
], ],
[ [
AC_CHECK_FUNCS(poll, x_io_backend=poll\(\)) AC_CHECK_FUNCS(poll,
AC_CHECK_HEADERS(poll.h, x_io_backend=poll\(\))
)
] ]
) )