From: Francis Dupont Date: Sat, 17 Sep 2016 21:52:45 +0000 (+0200) Subject: Added enable-kqueue/epoll/devpoll and with-bind-extra-config X-Git-Tag: v4_4_0b1_f1~134^2~8 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=13df2792f92abd827f501be3f30b2a1a6fa2f51e;p=thirdparty%2Fdhcp.git Added enable-kqueue/epoll/devpoll and with-bind-extra-config --- diff --git a/configure b/configure index 4f4552f09..532f57684 100755 --- a/configure +++ b/configure @@ -629,6 +629,7 @@ LDAP_CFLAGS LDAP_LIBS BINDSRCDIR BINDDIR +BINDIOMUX ac_prefix_program DISTCHECK_ATF_CONFIGURE_FLAG HAVE_ATF_FALSE @@ -773,6 +774,10 @@ with_cli6_pid_file with_relay_pid_file with_relay6_pid_file with_randomdev +enable_kqueue +enable_epoll +enable_devpoll +with_bind_extra_config with_libbind with_ldap with_ldapcrypto @@ -1437,6 +1442,9 @@ Optional Features: --enable-log-pid Include PIDs in syslog messages (default is no). --enable-binary-leases enable support for binary insertion of leases (default is no) + --enable-kqueue use BSD kqueue (default is no) + --enable-epoll use Linux epoll (default is no) + --enable-devpoll use /dev/poll (default is no) Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] @@ -1473,6 +1481,9 @@ Optional Packages: File for dhcrelay6 process information (default is LOCALSTATEDIR/run/dhcrelay6.pid) --with-randomdev=PATH Path for random device (default is /dev/random) + --with-bind-extra-config + configure bind librairies with some extra options + (default is none) --with-libbind=PATH bind includes and libraries are in PATH (default is ./bind) --with-ldap enable OpenLDAP support in dhcpd (default is no) @@ -6722,6 +6733,57 @@ fi BINDCONFIG="$BINDCONFIG --with-randomdev=$use_randomdev" fi +BINDIOMUX="--disable-kqueue --disable-epoll --disable-devpoll" +# check kqueue/epoll/devpoll alternative to select +# Check whether --enable-kqueue was given. +if test "${enable_kqueue+set}" = set; then : + enableval=$enable_kqueue; want_kqueue="$enableval" +else + want_kqueue="no" +fi + +if test "$enableval" = "yes"; then + BINDIOMUX="--enable-kqueue" +fi +# Check whether --enable-epoll was given. +if test "${enable_epoll+set}" = set; then : + enableval=$enable_epoll; want_epoll="$enableval" +else + want_epoll="no" +fi + +if test "$enableval" = "yes"; then + BINDIOMUX="--enable-epoll" +fi +# Check whether --enable-devpoll was given. +if test "${enable_devpoll+set}" = set; then : + enableval=$enable_devpoll; want_devpoll="$enableval" +else + want_devpoll="no" +fi + +if test "$enableval" = "yes"; then + BINDIOMUX="--enable-devpoll" +fi + + +# general extra bind configure arguments + +# Check whether --with-bind-extra-config was given. +if test "${with_bind_extra_config+set}" = set; then : + withval=$with_bind_extra_config; use_xbindconfig="$withval" +else + use_xbindconfig="" +fi + +case "$use_xbindconfig" in +yes|no|'') + ;; +*) + BINDCONFIG="$BINDCONFIG $use_xbindconfig" + ;; +esac + # see if there is a "sa_len" field in our interface information structure ac_fn_c_check_member "$LINENO" "struct sockaddr" "sa_len" "ac_cv_member_struct_sockaddr_sa_len" "#include " diff --git a/configure.ac b/configure.ac index 8b58835c4..3d8337889 100644 --- a/configure.ac +++ b/configure.ac @@ -631,6 +631,41 @@ else BINDCONFIG="$BINDCONFIG --with-randomdev=$use_randomdev" fi +BINDIOMUX="--disable-kqueue --disable-epoll --disable-devpoll" +# check kqueue/epoll/devpoll alternative to select +AC_ARG_ENABLE(kqueue, + AS_HELP_STRING([--enable-kqueue],[use BSD kqueue (default is no)]), + want_kqueue="$enableval", want_kqueue="no") +if test "$enableval" = "yes"; then + BINDIOMUX="--enable-kqueue" +fi +AC_ARG_ENABLE(epoll, + AS_HELP_STRING([--enable-epoll],[use Linux epoll (default is no)]), + want_epoll="$enableval", want_epoll="no") +if test "$enableval" = "yes"; then + BINDIOMUX="--enable-epoll" +fi +AC_ARG_ENABLE(devpoll, + AS_HELP_STRING([--enable-devpoll],[use /dev/poll (default is no)]), + want_devpoll="$enableval", want_devpoll="no") +if test "$enableval" = "yes"; then + BINDIOMUX="--enable-devpoll" +fi +AC_SUBST(BINDIOMUX) + +# general extra bind configure arguments +AC_ARG_WITH(bind-extra-config, + AS_HELP_STRING([--with-bind-extra-config],[configure bind librairies + with some extra options (default is none)]), + use_xbindconfig="$withval", use_xbindconfig="") +case "$use_xbindconfig" in +yes|no|'') + ;; +*) + BINDCONFIG="$BINDCONFIG $use_xbindconfig" + ;; +esac + # see if there is a "sa_len" field in our interface information structure AC_CHECK_MEMBER(struct sockaddr.sa_len, AC_DEFINE([HAVE_SA_LEN], [], diff --git a/util/Makefile.bind.in b/util/Makefile.bind.in index 495e3919e..8620a20d0 100644 --- a/util/Makefile.bind.in +++ b/util/Makefile.bind.in @@ -26,11 +26,12 @@ include ./bindvar.tmp bindsrcdir=bind-${version} -bindconfig = --disable-kqueue --disable-epoll --disable-devpoll \ - --without-openssl --without-libxml2 --enable-exportlib \ - --with-gssapi=no --enable-threads=no @BINDCONFIG@ \ +bindconfig = --without-openssl --without-libxml2 \ + --without-gssapi --disable-threads \ + --enable-exportlib \ --with-export-includedir=${binddir}/include \ - --with-export-libdir=${binddir}/lib + --with-export-libdir=${binddir}/lib \ + @BINDIOMUX@ @BINDCONFIG@ --enable-full-report @BIND_ATF_FALSE@cleandirs = ./lib ./include @BIND_ATF_TRUE@cleandirs = ./lib ./include ./atf