]> arthur.barton.de Git - ngircd-alex.git/blobdiff - configure.in
Not only check for poll(), make sure poll.h exists as well
[ngircd-alex.git] / configure.in
index e48e9e394148514e94c8978e3c796849f8153c9f..f3dbd7275cd4b437d0e98e59056db607bfa92d34 100644 (file)
@@ -160,10 +160,12 @@ AC_FUNC_STRFTIME
 
 AC_CHECK_FUNCS([ \
        bind gethostbyaddr gethostbyname gethostname inet_ntoa \
-       setsid setsockopt socket strcasecmp waitpid],,AC_MSG_ERROR([required function missing!]))
+       setsid setsockopt socket strcasecmp waitpid],,
+       AC_MSG_ERROR([required function missing!]))
 
-AC_CHECK_FUNCS(getaddrinfo getnameinfo inet_aton sigaction sigprocmask snprintf \
- vsnprintf strdup strlcpy strlcat strtok_r)
+AC_CHECK_FUNCS([ \
+       gai_strerror getaddrinfo getnameinfo inet_aton sigaction \
+       sigprocmask snprintf vsnprintf strdup strlcpy strlcat strtok_r])
 
 # -- Configuration options --
 
@@ -250,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\(\))
+               )
        ]
 )