Fail earlier if no lex or yacc is found; fix resolver DNS bug.
authorMichael Poole <mdpoole@troilus.org>
Tue, 25 Jan 2005 01:37:01 +0000 (01:37 +0000)
committerMichael Poole <mdpoole@troilus.org>
Tue, 25 Jan 2005 01:37:01 +0000 (01:37 +0000)
git-svn-id: file:///home/klmitch/undernet-ircu/undernet-ircu-svn/ircu2/trunk@1304 c9e4aea6-c8fd-4c43-8297-357d70d61c8c

ChangeLog
configure
configure.in
ircd/ircd_res.c

index 919be06c384dc7621e39456b91870ec43039cb50..7659815750e8e0009f4c9b987e99bf3812e5f9df 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2005-01-24  Michael Poole <mdpoole@troilus.org>
+
+       * configure.in: Make sure that $LEX and $YACC are reasonable and
+       actually run.
+
+       * configure: Regenerate.
+
+       * ircd/ircd_res.c (check_resolver_timeout): Use correct macro to
+       test whether the timer is already pending.
+
 2005-01-23  Michael Poole <mdpoole@troilus.org>
 
        * doc/example.conf (Kill): Fix typo in realname Kill block
index 2e114da6b166c0497df6b3aa45c8e81934e72c6e..ba2cf8c8f678978a0214bfb0e7370904c360c5a4 100755 (executable)
--- a/configure
+++ b/configure
@@ -8786,22 +8786,22 @@ _ACEOF
 fi
 
 fi
-if test -x "$LEX"
-then
+if  "$LEX" eq ":"  ; then
+  { { echo "$as_me:$LINENO: error: Cannot find flex." >&5
+echo "$as_me: error: Cannot find flex." >&2;}
+   { (exit 1); exit 1; }; }
+elif echo "" | $LEX -V -v --version > /dev/null 2>&1 ; then
   { { echo "$as_me:$LINENO: error: Cannot find flex." >&5
 echo "$as_me: error: Cannot find flex." >&2;}
    { (exit 1); exit 1; }; }
 fi
 
-if test -z "$LEXLIB"
-then
-  { { echo "$as_me:$LINENO: error:
-  Cannot find a library with yywrap() in, but flex was found.
+if test -z "$LEXLIB" ; then
+  { { echo "$as_me:$LINENO: error: Cannot find a library with yywrap() in, but flex was found.
   It's possible the compiler you're using ($CC) is incompatible with the
   installed library.
 See \`config.log' for more details." >&5
-echo "$as_me: error:
-  Cannot find a library with yywrap() in, but flex was found.
+echo "$as_me: error: Cannot find a library with yywrap() in, but flex was found.
   It's possible the compiler you're using ($CC) is incompatible with the
   installed library.
 See \`config.log' for more details." >&2;}
@@ -8851,8 +8851,11 @@ fi
 done
 test -n "$YACC" || YACC="yacc"
 
-if test -z "$YACC"
-then
+if  "$YACC" eq ":"  ; then
+  { { echo "$as_me:$LINENO: error: Cannot find yacc." >&5
+echo "$as_me: error: Cannot find yacc." >&2;}
+   { (exit 1); exit 1; }; }
+elif echo "" | $YACC -V -v --version > /dev/null 2>&1 ; then
   { { echo "$as_me:$LINENO: error: Cannot find yacc." >&5
 echo "$as_me: error: Cannot find yacc." >&2;}
    { (exit 1); exit 1; }; }
index 88ec8c71f848bd8de6622551009f10f8f35d9da4..2532dfbe084575c399198c5ec824ec2283f3e045 100644 (file)
@@ -142,16 +142,16 @@ AC_PATH_PROGS(SHPROG, sh, /bin/sh)
 
 dnl (F)LEX - needed for the new conf file parser
 AC_PROG_LEX
-if test -x "$LEX"
-then 
+dnl The autoconf docs say $LEX defaults to 'lex'.  They lie.
+if [ "$LEX" eq ":" ] ; then
+  AC_MSG_ERROR([Cannot find flex.])
+elif echo "" | $LEX -V -v --version > /dev/null 2>&1 ; then
   AC_MSG_ERROR([Cannot find flex.])
 fi
 
-if test -z "$LEXLIB"
-then
-  AC_MSG_FAILURE([
-  Cannot find a library with yywrap() in, but flex was found.  
-  It's possible the compiler you're using ($CC) is incompatible with the 
+if test -z "$LEXLIB" ; then
+  AC_MSG_FAILURE([Cannot find a library with yywrap() in, but flex was found.
+  It's possible the compiler you're using ($CC) is incompatible with the
   installed library.])
 fi
 
@@ -159,8 +159,11 @@ LIBS="$LEXLIB $LIBS"
 
 dnl YACC - ditto
 AC_PROG_YACC
-if test -z "$YACC"
-then
+dnl The autoconf docs say $YACC defaults to 'yacc'.  This seems to be true,
+dnl but judging from AC_PROG_LEX, it may not stay true.
+if [ "$YACC" eq ":" ] ; then
+  AC_MSG_ERROR([Cannot find yacc.])
+elif echo "" | $YACC -V -v --version > /dev/null 2>&1 ; then
   AC_MSG_ERROR([Cannot find yacc.])
 fi
 
index c9960f6b17780c3a53123e933e38f48009bc42f6..e56c6cd9956a1af657788383a800ad8eb4d35368 100644 (file)
@@ -278,7 +278,7 @@ check_resolver_timeout(time_t when)
 {
   if (when > CurrentTime + AR_TTL)
     when = CurrentTime + AR_TTL;
-  if (!t_active(&res_timeout))
+  if (!t_onqueue(&res_timeout))
     timer_add(&res_timeout, timeout_resolver, NULL, TT_ABSOLUTE, when);
   else if (when < t_expire(&res_timeout))
     timer_chg(&res_timeout, TT_ABSOLUTE, when);