]> arthur.barton.de Git - ngircd-alex.git/blobdiff - configure.in
add support for the poll() interface
[ngircd-alex.git] / configure.in
index ee45da37c8da31c6603c1ccefe4f5b50afa78755..2381916b36d4185c91f0deba1f088c3c7c7154bd 100644 (file)
@@ -8,7 +8,7 @@
 # (at your option) any later version.
 # Please read the file COPYING, README and AUTHORS for more information.
 #
-# $Id: configure.in,v 1.121 2006/09/09 17:07:39 fw Exp $
+# $Id: configure.in,v 1.122 2006/09/16 15:00:09 fw Exp $
 #
 
 # -- Initialisation --
@@ -200,6 +200,25 @@ fi
 
 
 x_io_backend=select
+AC_ARG_WITH(poll,
+       [  --without-poll          disable poll support (autodetected by default)],
+       [       if test "$withval" != "no"; then
+                       if test "$withval" != "yes"; then
+                               CFLAGS="-I$withval/include $CFLAGS"
+                               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 support!])
+                       )
+               fi
+       ],
+       [
+               AC_CHECK_FUNCS(poll, x_io_backend=poll)
+       ]
+)
+
+
 AC_ARG_WITH(epoll,
        [  --without-epoll         disable epoll support (autodetected by default)],
        [       if test "$withval" != "no"; then
@@ -218,6 +237,7 @@ AC_ARG_WITH(epoll,
        ]
 )
 
+
 AC_ARG_WITH(kqueue,
        [  --without-kqueue        disable kqueue support (autodetected by default)],
        [       if test "$withval" != "no"; then