]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
[master] add epoll test for perftcpdns
authorEvan Hunt <each@isc.org>
Sat, 12 Apr 2014 02:13:51 +0000 (19:13 -0700)
committerEvan Hunt <each@isc.org>
Sat, 12 Apr 2014 02:13:51 +0000 (19:13 -0700)
contrib/perftcpdns/configure
contrib/perftcpdns/configure.in

index b533420be2816b3d755e7d5778239a6e59c45a7a..2be15f8d735b4e1cbd98c64c9e1472518a7e0db6 100755 (executable)
@@ -1416,6 +1416,48 @@ fi
   as_fn_set_status $ac_retval
 
 } # ac_fn_c_try_link
+
+# ac_fn_c_try_run LINENO
+# ----------------------
+# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
+# that executables *can* be run.
+ac_fn_c_try_run ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  if { { ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_link") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
+  { { case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; }; then :
+  ac_retval=0
+else
+  $as_echo "$as_me: program exited with status $ac_status" >&5
+       $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_retval=$ac_status
+fi
+  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+  as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_run
 cat >config.log <<_ACEOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
@@ -2653,6 +2695,36 @@ _ACEOF
 fi
 
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking epoll support" >&5
+$as_echo_n "checking epoll support... " >&6; }
+if test "$cross_compiling" = yes; then :
+  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot run test program while cross compiling
+See \`config.log' for more details" "$LINENO" 5; }
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <sys/epoll.h>
+int main() {
+       if (epoll_create(1) < 0)
+               return (1);
+       return (0);
+}
+
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+else
+  as_fn_error $? "epoll not found" "$LINENO" 5
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
 case "$host" in
         *-freebsd*)
                 # We don't want to set -lpthread as that break
index 4da245ecd54e9a311b5b65b3433f6f107b78aee8..661b67127ce781cf4a3c15c27ac61ab384c89be7 100644 (file)
@@ -21,6 +21,16 @@ AC_PROG_CC
 AC_CHECK_LIB(m, sqrt)
 AC_CHECK_LIB(rt, clock_gettime)
 
+AC_MSG_CHECKING(epoll support)
+AC_TRY_RUN([
+#include <sys/epoll.h>
+int main() {
+       if (epoll_create(1) < 0)
+               return (1);
+       return (0);
+}
+], [AC_MSG_RESULT(yes)], [AC_MSG_ERROR(epoll not found)])
+
 case "$host" in
         *-freebsd*)
                 # We don't want to set -lpthread as that break