/[svn]/branches/newio/acinclude.m4
ViewVC logotype

Contents of /branches/newio/acinclude.m4

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2383 - (show annotations)
Sat Jul 6 17:05:28 2013 UTC (9 years, 2 months ago) by michael
File size: 2424 byte(s)
- Add new configure test for epoll(), poll(), kqueue() and /dev/poll. This
  mixture basically stolen from libevent and ircu

1 dnl Inspired by work Copyright (C) 2006 Luca Filipozzi
2 dnl vim: set fdm=marker sw=2 ts=2 et si:
3 dnl {{{ ax_check_lib_ipv4
4 AC_DEFUN([AX_CHECK_LIB_IPV4],[
5 AC_CHECK_FUNC(getaddrinfo, [], AC_SEARCH_LIBS(getaddrinfo, nsl))
6 AC_CHECK_FUNC(getnameinfo, [], AC_SEARCH_LIBS(getnameinfo, nsl))
7 AC_SEARCH_LIBS([socket],[socket],,[AC_MSG_ERROR([socket library not found])])
8 AC_CHECK_TYPES([struct sockaddr_in, struct sockaddr_storage, struct addrinfo],,,[#include <sys/types.h>
9 #include <sys/socket.h>
10 #include <netdb.h>
11 ])
12 AC_CHECK_MEMBERS([struct sockaddr_in.sin_len],,,[#include <sys/types.h>
13 <sys/socket.h>])
14 ])dnl }}}
15 dnl {{{ ax_check_lib_ipv6
16 AC_DEFUN([AX_CHECK_LIB_IPV6],[
17 AC_CHECK_TYPE([struct sockaddr_in6],[AC_DEFINE([IPV6],[1],[Define to 1 if you have IPv6 support.])],,[#include <netinet/in.h>])
18 ])dnl }}}
19 dnl {{{ ax_arg_enable_halfops
20 AC_DEFUN([AX_ARG_ENABLE_HALFOPS],[
21 AC_ARG_ENABLE([halfops],[AS_HELP_STRING([--enable-halfops],[Enable halfops support.])],[halfops="$enableval"],[halfops="no"])
22 if test "$halfops" = "yes" ; then
23 AC_DEFINE([HALFOPS],[1],[Define to 1 if you want halfops support.])
24 fi
25 ])dnl }}}
26 dnl {{{ ax_arg_enable_debugging
27 AC_DEFUN([AX_ARG_ENABLE_DEBUGGING],[
28 AC_ARG_ENABLE([debugging],[AS_HELP_STRING([--enable-debugging],[Enable debugging.])],[debugging="$enableval"],[debugging="no"])
29 if test "$debugging" = "yes" ; then
30 CFLAGS="-Wall -g -O0"
31 fi
32 ])dnl }}}
33 dnl {{{ ax_arg_enable_warnings
34 AC_DEFUN([AX_ARG_ENABLE_WARNINGS],[
35 AC_ARG_ENABLE([warnings],[AS_HELP_STRING([--enable-warnings],[Enable compiler warnings.])],[warnings="$enableval"],[warnings="no"])
36 if test "$warnings" = "yes" ; then
37 CFLAGS="-Wall -Wextra -Wno-unused -Wcast-qual -Wcast-align -Wbad-function-cast -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wredundant-decls -Wshadow -Wwrite-strings -Wundef"
38 fi
39 ])dnl }}}
40 dnl {{{ ac_define_dir
41 dnl http://autoconf-archive.cryp.to/ac_define_dir.html
42 AC_DEFUN([AC_DEFINE_DIR], [
43 prefix_NONE=
44 exec_prefix_NONE=
45 test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix
46 test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix
47 eval ac_define_dir="\"[$]$2\""
48 eval ac_define_dir="\"$ac_define_dir\""
49 AC_SUBST($1, "$ac_define_dir")
50 AC_DEFINE_UNQUOTED($1, "$ac_define_dir", [$3])
51 test "$prefix_NONE" && prefix=NONE
52 test "$exec_prefix_NONE" && exec_prefix=NONE
53 ])dnl }}}
54 ]) dnl }}}

Properties

Name Value
svn:eol-style native

svnadmin@ircd-hybrid.org
ViewVC Help
Powered by ViewVC 1.1.28