Not only check for poll(), make sure poll.h exists as well
[ngircd-alex.git] / configure.in
index 92434ec7d044945f9a25914804cd0df289acade1..f3dbd7275cd4b437d0e98e59056db607bfa92d34 100644 (file)
@@ -252,13 +252,22 @@ AC_ARG_WITH(poll,
                                CPPFLAGS="-I$withval/include $CPPFLAGS"
                                LDFLAGS="-L$withval/lib $LDFLAGS"
                        fi
-                       AC_CHECK_FUNCS(poll, x_io_backend=poll\(\),
-                               AC_MSG_ERROR([Can't enable poll IO support!])
+                       AC_CHECK_FUNCS(poll,
+                               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
        ],
        [
-               AC_CHECK_FUNCS(poll, x_io_backend=poll\(\))
+               AC_CHECK_FUNCS(poll,
+                       AC_CHECK_HEADERS(poll.h, x_io_backend=poll\(\))
+               )
        ]
 )