[cvslog] [CVS] Module eggdrop1.6: Change committed

cvs at eggheads.org cvs at eggheads.org
Fri Apr 1 06:10:19 CST 2011


CVSROOT    : /usr/local/cvsroot
Module     : eggdrop1.6
Commit time: 2011-04-01 12:10:19 UTC
Committer  : Rumen Stoyanov <pseudo at egg6.net>

Modified files:
     aclocal.m4 config.h.in configure doc/Changes1.6 src/eggdrop.h
     src/patch.h src/mod/dns.mod/configure
     src/mod/dns.mod/configure.ac

Log message:

Fixed dns.mod on QNX6/Mac OS X/Solaris. Rewrote dns.mod's autoconf checks to detect the resolver library properly on Darwin/Solaris/QNX6.
Backport of the 1.8 patch.

---------------------- diff included ----------------------
Index: eggdrop1.6/aclocal.m4
diff -u eggdrop1.6/aclocal.m4:1.117 eggdrop1.6/aclocal.m4:1.118
--- eggdrop1.6/aclocal.m4:1.117	Sun Feb 13 08:19:32 2011
+++ eggdrop1.6/aclocal.m4	Fri Apr  1 06:10:08 2011
@@ -16,7 +16,7 @@
 dnl along with this program; if not, write to the Free Software
 dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 dnl
-dnl $Id: aclocal.m4,v 1.117 2011/02/13 14:19:32 simple Exp $
+dnl $Id: aclocal.m4,v 1.118 2011/04/01 12:10:08 pseudo Exp $
 dnl
 
 
@@ -734,6 +734,7 @@
     ;;
     QNX)
       SHLIB_LD="ld -shared"
+      AC_DEFINE(QNX_HACKS, 1, [Define if running under QNX.])
     ;;
     OSF1)
       case `echo "$egg_cv_var_system_release" | cut -d . -f 1` in
Index: eggdrop1.6/config.h.in
diff -u eggdrop1.6/config.h.in:1.58 eggdrop1.6/config.h.in:1.59
--- eggdrop1.6/config.h.in:1.58	Sun Feb 13 08:19:32 2011
+++ eggdrop1.6/config.h.in	Fri Apr  1 06:10:08 2011
@@ -341,6 +341,9 @@
 /* Define to the version of this package. */
 #undef PACKAGE_VERSION
 
+/* Define if running under QNX. */
+#undef QNX_HACKS
+
 /* Define to the type of arg 1 for `select'. */
 #undef SELECT_TYPE_ARG1
 
Index: eggdrop1.6/configure
diff -u eggdrop1.6/configure:1.168 eggdrop1.6/configure:1.169
--- eggdrop1.6/configure:1.168	Sun Feb 13 08:19:32 2011
+++ eggdrop1.6/configure	Fri Apr  1 06:10:08 2011
@@ -1,5 +1,5 @@
 #! /bin/sh
-# From configure.ac Revision: 1.40 .
+# From configure.ac Revision: 1.41 .
 # Guess values for system-dependent variables and create Makefiles.
 # Generated by GNU Autoconf 2.65 for Eggdrop 1.6.20.
 #
@@ -5504,6 +5504,9 @@
     ;;
     QNX)
       SHLIB_LD="ld -shared"
+
+$as_echo "#define QNX_HACKS 1" >>confdefs.h
+
     ;;
     OSF1)
       case `echo "$egg_cv_var_system_release" | cut -d . -f 1` in
@@ -6803,7 +6806,6 @@
 main ()
 {
   char *data, *data2, *data3;
-  const char *cdata2;
   int i, pagesize;
   int fd, fd2;
 
@@ -6828,10 +6830,10 @@
   fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600);
   if (fd2 < 0)
     return 4;
-  cdata2 = "";
-  if (write (fd2, cdata2, 1) != 1)
+  data2 = "";
+  if (write (fd2, data2, 1) != 1)
     return 5;
-  data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L);
+  data2 = mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L);
   if (data2 == MAP_FAILED)
     return 6;
   for (i = 0; i < pagesize; ++i)
Index: eggdrop1.6/doc/Changes1.6
diff -u eggdrop1.6/doc/Changes1.6:1.97 eggdrop1.6/doc/Changes1.6:1.98
--- eggdrop1.6/doc/Changes1.6:1.97	Fri Apr  1 05:59:49 2011
+++ eggdrop1.6/doc/Changes1.6	Fri Apr  1 06:10:08 2011
@@ -1,4 +1,4 @@
-$Id: Changes1.6,v 1.97 2011/04/01 11:59:49 pseudo Exp $
+$Id: Changes1.6,v 1.98 2011/04/01 12:10:08 pseudo Exp $
 
 Eggdrop Changes (since version 1.6.0)
 
@@ -6,6 +6,13 @@
 
 1.6.21 (CVS):
 
+  - Fixed dns.mod on QNX6/Mac OS X/Solaris
+  - Rewrote dns.mod's autoconf checks to detect the resolver library properly
+    on Darwin/Solaris.
+  - Added -lsocket to the list of libraries searched for res_* functions, in
+    order to support QNX6.
+    Patch by: pseudo
+
   - Replaced most dns.mod preprocessor definitions with config variables.
   - Added support for user-specified dns servers and non-standard ports.
     This is most important for Cygwin 1.7, where the dns server list won't
Index: eggdrop1.6/src/eggdrop.h
diff -u eggdrop1.6/src/eggdrop.h:1.79 eggdrop1.6/src/eggdrop.h:1.80
--- eggdrop1.6/src/eggdrop.h:1.79	Sun Feb 13 08:19:33 2011
+++ eggdrop1.6/src/eggdrop.h	Fri Apr  1 06:10:08 2011
@@ -4,7 +4,7 @@
  *
  *   IF YOU ALTER THIS FILE, YOU NEED TO RECOMPILE THE BOT.
  *
- * $Id: eggdrop.h,v 1.79 2011/02/13 14:19:33 simple Exp $
+ * $Id: eggdrop.h,v 1.80 2011/04/01 12:10:08 pseudo Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -195,7 +195,15 @@
 /* Yikes...who would have thought finding a usable random() would be so much
  * trouble?
  * Note: random(), rand(), and lrand48() are *not* thread safe.
+ *
+ * QNX doesn't include random() and srandom() in libc.so, only in libc.a
+ * So we can only use these functions in static builds on QNX.
  */
+#if defined QNX_HACKS && defined MAKING_MODS
+#  undef HAVE_RANDOM
+#  undef HAVE_SRANDOM
+#endif
+
 #ifdef HAVE_RANDOM
   /* On systems with random(), RANDOM_MAX may or may not be defined.
    *
@@ -244,7 +252,7 @@
 /* Use high-order bits for getting the random integer. With a modern
  * random() implmentation, modulo would probably be sufficient, but on
  * systems lacking random(), it may just be a macro for an older rand()
- * fucntion.
+ * function.
  */
 #define randint(n) (unsigned long) (random() / (RANDOM_MAX + 1.0) * n)
 
Index: eggdrop1.6/src/mod/dns.mod/configure
diff -u eggdrop1.6/src/mod/dns.mod/configure:1.30 eggdrop1.6/src/mod/dns.mod/configure:1.31
--- eggdrop1.6/src/mod/dns.mod/configure:1.30	Sun Feb 13 08:19:33 2011
+++ eggdrop1.6/src/mod/dns.mod/configure	Fri Apr  1 06:10:09 2011
@@ -1,5 +1,5 @@
 #! /bin/sh
-# From configure.ac Revision: 1.10 .
+# From configure.ac Revision: 1.11 .
 # Guess values for system-dependent variables and create Makefiles.
 # Generated by GNU Autoconf 2.65 for Eggdrop DNS Module 1.6.20.
 #
@@ -564,14 +564,6 @@
 LIBOBJS
 RESINCLUDE
 RESLIB
-host_os
-host_vendor
-host_cpu
-host
-build_os
-build_vendor
-build_cpu
-build
 OBJEXT
 EXEEXT
 ac_ct_CC
@@ -1227,10 +1219,6 @@
 _ACEOF
 
   cat <<\_ACEOF
-
-System types:
-  --build=BUILD     configure for building on BUILD [guessed]
-  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
 _ACEOF
 fi
 
@@ -1369,6 +1357,37 @@
 
 } # ac_fn_c_try_compile
 
+# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
+# -------------------------------------------------------
+# Tests whether HEADER exists and can be compiled using the include files in
+# INCLUDES, setting the cache variable VAR accordingly.
+ac_fn_c_check_header_compile ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$4
+#include <$2>
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  eval "$3=yes"
+else
+  eval "$3=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$3
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+
+} # ac_fn_c_check_header_compile
+
 # ac_fn_c_try_link LINENO
 # -----------------------
 # Try to link conftest.$ac_ext, and return whether this succeeded.
@@ -1414,73 +1433,6 @@
   as_fn_set_status $ac_retval
 
 } # ac_fn_c_try_link
-
-# ac_fn_c_check_func LINENO FUNC VAR
-# ----------------------------------
-# Tests whether FUNC exists, setting the cache variable VAR accordingly
-ac_fn_c_check_func ()
-{
-  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
-$as_echo_n "checking for $2... " >&6; }
-if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define $2 innocuous_$2
-
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $2 (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef $2
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char $2 ();
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined __stub_$2 || defined __stub___$2
-choke me
-#endif
-
-int
-main ()
-{
-return $2 ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  eval "$3=yes"
-else
-  eval "$3=no"
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-fi
-eval ac_res=\$$3
-	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
-
-} # ac_fn_c_check_func
 cat >config.log <<_ACEOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
@@ -1861,7 +1813,7 @@
 
 
 
-dns_reslib_avail="true"
+dns_reslib_avail="false"
 
 ac_ext=c
 ac_cpp='$CPP $CPPFLAGS'
@@ -2655,495 +2607,88 @@
 ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 
-ac_fn_c_check_func "$LINENO" "res_init" "ac_cv_func_res_init"
-if test "x$ac_cv_func_res_init" = x""yes; then :
-
-else
-
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_init in -lresolv" >&5
-$as_echo_n "checking for res_init in -lresolv... " >&6; }
-if test "${ac_cv_lib_resolv_res_init+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lresolv  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
+for ac_header in sys/types.h netinet/in.h arpa/nameser.h netdb.h resolv.h
+do :
+  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "#ifdef HAVE_SYS_TYPES_H
+#  include <sys/types.h>
 #endif
-char res_init ();
-int
-main ()
-{
-return res_init ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_resolv_res_init=yes
-else
-  ac_cv_lib_resolv_res_init=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_res_init" >&5
-$as_echo "$ac_cv_lib_resolv_res_init" >&6; }
-if test "x$ac_cv_lib_resolv_res_init" = x""yes; then :
-
-    RESLIB="-lresolv"
-
-else
-
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_init in -lbind" >&5
-$as_echo_n "checking for res_init in -lbind... " >&6; }
-if test "${ac_cv_lib_bind_res_init+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lbind  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
+#ifdef HAVE_NETINET_IN_H
+#  include <netinet/in.h>   /* inet_ functions / structs */
 #endif
-char res_init ();
-int
-main ()
-{
-return res_init ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_bind_res_init=yes
-else
-  ac_cv_lib_bind_res_init=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bind_res_init" >&5
-$as_echo "$ac_cv_lib_bind_res_init" >&6; }
-if test "x$ac_cv_lib_bind_res_init" = x""yes; then :
-
-      RESLIB="-lbind"
-
-else
-
-      dns_reslib_avail="false"
-
-fi
-
-
-fi
-
-
-fi
-
-
-if test "${dns_reslib_avail}" = "false"; then
-  dns_reslib_avail="true"
-
-  ac_fn_c_check_func "$LINENO" "__res_init" "ac_cv_func___res_init"
-if test "x$ac_cv_func___res_init" = x""yes; then :
-
-else
-
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __res_init in -lresolv" >&5
-$as_echo_n "checking for __res_init in -lresolv... " >&6; }
-if test "${ac_cv_lib_resolv___res_init+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lresolv  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
+#ifdef HAVE_ARPA_NAMESER_H
+#  include <arpa/nameser.h> /* DNS HEADER struct */
 #endif
-char __res_init ();
-int
-main ()
-{
-return __res_init ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_resolv___res_init=yes
-else
-  ac_cv_lib_resolv___res_init=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv___res_init" >&5
-$as_echo "$ac_cv_lib_resolv___res_init" >&6; }
-if test "x$ac_cv_lib_resolv___res_init" = x""yes; then :
-
-      RESLIB="-lresolv"
-
-else
-
-      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __res_init in -lbind" >&5
-$as_echo_n "checking for __res_init in -lbind... " >&6; }
-if test "${ac_cv_lib_bind___res_init+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lbind  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
+#ifdef HAVE_NETDB_H
+#  include <netdb.h>
 #endif
-char __res_init ();
-int
-main ()
-{
-return __res_init ();
-  ;
-  return 0;
-}
+"
+eval as_val=\$$as_ac_Header
+   if test "x$as_val" = x""yes; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
 _ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_bind___res_init=yes
-else
-  ac_cv_lib_bind___res_init=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bind___res_init" >&5
-$as_echo "$ac_cv_lib_bind___res_init" >&6; }
-if test "x$ac_cv_lib_bind___res_init" = x""yes; then :
-
-        RESLIB="-lbind"
-
-else
-
-        dns_reslib_avail="false"
-
-fi
-
-
-fi
-
 
 fi
 
-fi
+done
 
-ac_fn_c_check_func "$LINENO" "res_mkquery" "ac_cv_func_res_mkquery"
-if test "x$ac_cv_func_res_mkquery" = x""yes; then :
 
-else
 
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_mkquery in -lresolv" >&5
-$as_echo_n "checking for res_mkquery in -lresolv... " >&6; }
-if test "${ac_cv_lib_resolv_res_mkquery+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lresolv  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+for lib in '' -lresolv -lbind -lsocket
+do
+  LIBS="$lib"
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char res_mkquery ();
-int
-main ()
-{
-return res_mkquery ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_resolv_res_mkquery=yes
-else
-  ac_cv_lib_resolv_res_mkquery=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_res_mkquery" >&5
-$as_echo "$ac_cv_lib_resolv_res_mkquery" >&6; }
-if test "x$ac_cv_lib_resolv_res_mkquery" = x""yes; then :
-
-    if test "x${RESLIB}" != "x-lresolv"; then
-      RESLIB="${RESLIB} -lresolv"
-    fi
-
-else
+      #ifdef HAVE_SYS_TYPES_H
+      #  include <sys/types.h>
+      #endif
+      #ifdef HAVE_NETINET_IN_H
+      #  include <netinet/in.h>   /* inet_ functions / structs */
+      #endif
+      #ifdef HAVE_ARPA_NAMESER_H
+      #  include <arpa/nameser.h> /* DNS HEADER struct */
+      #endif
+      #ifdef HAVE_NETDB_H
+      #  include <netdb.h>
+      #endif
+      #include <resolv.h>
 
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_mkquery in -lbind" >&5
-$as_echo_n "checking for res_mkquery in -lbind... " >&6; }
-if test "${ac_cv_lib_bind_res_mkquery+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lbind  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char res_mkquery ();
 int
 main ()
 {
-return res_mkquery ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_bind_res_mkquery=yes
-else
-  ac_cv_lib_bind_res_mkquery=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bind_res_mkquery" >&5
-$as_echo "$ac_cv_lib_bind_res_mkquery" >&6; }
-if test "x$ac_cv_lib_bind_res_mkquery" = x""yes; then :
 
-      if test "x${RESLIB}" != "x-lbind"; then
-        RESLIB="${RESLIB} -lbind"
-      fi
-
-else
+      res_init();
+      res_mkquery(0, NULL, 0, 0, NULL, 0, NULL, NULL, 0);
+      ;
+      return 0;
 
-      dns_reslib_avail="false"
-
-fi
-
-
-fi
-
-
-fi
-
-
-if test "${dns_reslib_avail}" = "false"; then
-  dns_reslib_avail="true"
-
-  ac_fn_c_check_func "$LINENO" "__res_mkquery" "ac_cv_func___res_mkquery"
-if test "x$ac_cv_func___res_mkquery" = x""yes; then :
-
-else
-
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __res_mkquery in -lresolv" >&5
-$as_echo_n "checking for __res_mkquery in -lresolv... " >&6; }
-if test "${ac_cv_lib_resolv___res_mkquery+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lresolv  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char __res_mkquery ();
-int
-main ()
-{
-return __res_mkquery ();
   ;
   return 0;
 }
+
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_resolv___res_mkquery=yes
-else
-  ac_cv_lib_resolv___res_mkquery=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv___res_mkquery" >&5
-$as_echo "$ac_cv_lib_resolv___res_mkquery" >&6; }
-if test "x$ac_cv_lib_resolv___res_mkquery" = x""yes; then :
 
-      if test "x${RESLIB}" != "x-lresolv"; then
-        RESLIB="${RESLIB} -lresolv"
-      fi
-
-else
-
-      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __res_mkquery in -lbind" >&5
-$as_echo_n "checking for __res_mkquery in -lbind... " >&6; }
-if test "${ac_cv_lib_bind___res_mkquery+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lbind  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
+    RESLIB="$lib"
+    dns_reslib_avail="true"
+    break
 
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char __res_mkquery ();
-int
-main ()
-{
-return __res_mkquery ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_bind___res_mkquery=yes
-else
-  ac_cv_lib_bind___res_mkquery=no
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bind___res_mkquery" >&5
-$as_echo "$ac_cv_lib_bind___res_mkquery" >&6; }
-if test "x$ac_cv_lib_bind___res_mkquery" = x""yes; then :
-
-        if test "x${RESLIB}" != "x-lbind"; then
-          RESLIB="${RESLIB} -lbind"
-        fi
-
-else
-
-        dns_reslib_avail="false";
-
-fi
-
-
-fi
-
-
-fi
-
-fi
-
-# Cygwin checks.
-# Make sure we can run config.sub.
-$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
-  as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
-$as_echo_n "checking build system type... " >&6; }
-if test "${ac_cv_build+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_build_alias=$build_alias
-test "x$ac_build_alias" = x &&
-  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
-test "x$ac_build_alias" = x &&
-  as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5
-ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
-  as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
-$as_echo "$ac_cv_build" >&6; }
-case $ac_cv_build in
-*-*-*) ;;
-*) as_fn_error "invalid value of canonical build" "$LINENO" 5;;
-esac
-build=$ac_cv_build
-ac_save_IFS=$IFS; IFS='-'
-set x $ac_cv_build
-shift
-build_cpu=$1
-build_vendor=$2
-shift; shift
-# Remember, the first character of IFS is used to create $*,
-# except with old shells:
-build_os=$*
-IFS=$ac_save_IFS
-case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
-
+done
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
-$as_echo_n "checking host system type... " >&6; }
-if test "${ac_cv_host+set}" = set; then :
-  $as_echo_n "(cached) " >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a working resolver library" >&5
+$as_echo_n "checking for a working resolver library... " >&6; }
+if test "$dns_reslib_avail" = "true"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes ($LIBS)" >&5
+$as_echo "yes ($LIBS)" >&6; }
 else
-  if test "x$host_alias" = x; then
-  ac_cv_host=$ac_cv_build
-else
-  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
-    as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
-fi
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
-$as_echo "$ac_cv_host" >&6; }
-case $ac_cv_host in
-*-*-*) ;;
-*) as_fn_error "invalid value of canonical host" "$LINENO" 5;;
-esac
-host=$ac_cv_host
-ac_save_IFS=$IFS; IFS='-'
-set x $ac_cv_host
-shift
-host_cpu=$1
-host_vendor=$2
-shift; shift
-# Remember, the first character of IFS is used to create $*,
-# except with old shells:
-host_os=$*
-IFS=$ac_save_IFS
-case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
-
-
-if test "${dns_reslib_avail}" = "false"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+  # Cygwin checks.
   case $host_os in
     *cygwin* )
       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /usr/local/bind/lib/libbind.a" >&5
Index: eggdrop1.6/src/mod/dns.mod/configure.ac
diff -u eggdrop1.6/src/mod/dns.mod/configure.ac:1.11 eggdrop1.6/src/mod/dns.mod/configure.ac:1.12
--- eggdrop1.6/src/mod/dns.mod/configure.ac:1.11	Sun Feb 13 08:19:33 2011
+++ eggdrop1.6/src/mod/dns.mod/configure.ac	Fri Apr  1 06:10:09 2011
@@ -1,6 +1,6 @@
 dnl configure.ac: this file is processed by autoconf to produce ./configure.
 dnl
-dnl $Id: configure.ac,v 1.11 2011/02/13 14:19:33 simple Exp $
+dnl $Id: configure.ac,v 1.12 2011/04/01 12:10:09 pseudo Exp $
 
 AC_PREREQ(2.59)
 
@@ -12,89 +12,48 @@
 AC_CONFIG_AUX_DIR(../../../misc)
 
 AC_COPYRIGHT([Copyright (C) 1999 - 2011 Eggheads Development Team])
-AC_REVISION($Revision: 1.11 $)
+AC_REVISION($Revision: 1.12 $)
 
-dns_reslib_avail="true"
+dns_reslib_avail="false"
 
-AC_CHECK_FUNC(res_init, [],
-[
-  AC_CHECK_LIB(resolv, res_init,
-  [
-    RESLIB="-lresolv"
-  ], [
-    AC_CHECK_LIB(bind, res_init,
-    [
-      RESLIB="-lbind"
-    ], [
-      dns_reslib_avail="false"
-    ])
-  ])
-])
-
-if test "${dns_reslib_avail}" = "false"; then
-  dns_reslib_avail="true"
+AC_HEADER_RESOLV
 
-  AC_CHECK_FUNC(__res_init, [],
-  [
-    AC_CHECK_LIB(resolv, __res_init,
-    [
-      RESLIB="-lresolv"
+for lib in '' -lresolv -lbind -lsocket
+do
+  LIBS="$lib"
+  AC_LINK_IFELSE([AC_LANG_PROGRAM([
+      #ifdef HAVE_SYS_TYPES_H
+      #  include <sys/types.h>
+      #endif
+      #ifdef HAVE_NETINET_IN_H
+      #  include <netinet/in.h>   /* inet_ functions / structs */
+      #endif
+      #ifdef HAVE_ARPA_NAMESER_H
+      #  include <arpa/nameser.h> /* DNS HEADER struct */
+      #endif
+      #ifdef HAVE_NETDB_H
+      #  include <netdb.h>
+      #endif
+      #include <resolv.h>
     ], [
-      AC_CHECK_LIB(bind, __res_init,
-      [
-        RESLIB="-lbind"
-      ], [
-        dns_reslib_avail="false"
-      ])
+      res_init();
+      res_mkquery(0, NULL, 0, 0, NULL, 0, NULL, NULL, 0);
+      ;
+      return 0;
     ])
-  ])
-fi
-
-AC_CHECK_FUNC(res_mkquery, [],
-[
-  AC_CHECK_LIB(resolv, res_mkquery,
-  [
-    if test "x${RESLIB}" != "x-lresolv"; then
-      RESLIB="${RESLIB} -lresolv"
-    fi
   ], [
-    AC_CHECK_LIB(bind, res_mkquery,
-    [
-      if test "x${RESLIB}" != "x-lbind"; then
-        RESLIB="${RESLIB} -lbind"
-      fi
-    ], [
-      dns_reslib_avail="false"
-    ])
-  ])
-])
-
-if test "${dns_reslib_avail}" = "false"; then
-  dns_reslib_avail="true"
-
-  AC_CHECK_FUNC(__res_mkquery, [],
-  [
-    AC_CHECK_LIB(resolv, __res_mkquery,
-    [
-      if test "x${RESLIB}" != "x-lresolv"; then
-        RESLIB="${RESLIB} -lresolv"
-      fi
-    ], [
-      AC_CHECK_LIB(bind, __res_mkquery,
-      [
-        if test "x${RESLIB}" != "x-lbind"; then
-          RESLIB="${RESLIB} -lbind"
-        fi
-      ], [
-        dns_reslib_avail="false";
-      ])
-    ])
+    RESLIB="$lib"
+    dns_reslib_avail="true"
+    break
   ])
-fi
+done
 
-# Cygwin checks.
-AC_CANONICAL_HOST
-if test "${dns_reslib_avail}" = "false"; then
+AC_MSG_CHECKING([for a working resolver library])
+if test "$dns_reslib_avail" = "true"; then
+  AC_MSG_RESULT([yes ($LIBS)])
+else
+  AC_MSG_RESULT(no)
+  # Cygwin checks.
   case $host_os in
     *cygwin* )
       AC_MSG_CHECKING([for /usr/local/bind/lib/libbind.a])
Index: eggdrop1.6/src/patch.h
diff -u eggdrop1.6/src/patch.h:1.1258 eggdrop1.6/src/patch.h:1.1259
--- eggdrop1.6/src/patch.h:1.1258	Fri Apr  1 05:59:49 2011
+++ eggdrop1.6/src/patch.h	Fri Apr  1 06:10:08 2011
@@ -10,7 +10,7 @@
  * statement, leave the rest of the file alone, this allows better
  * overlapping patches.
  *
- * $Id: patch.h,v 1.1258 2011/04/01 11:59:49 pseudo Exp $
+ * $Id: patch.h,v 1.1259 2011/04/01 12:10:08 pseudo Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -41,12 +41,12 @@
  *
  *
  */
-patch("1301658548");            /* current unixtime */
+patch("1301659661");            /* current unixtime */
 /*
  *
  *
  */
-patch("dnssettings");
+patch("dnsautoconf");
 /*
  *
  *
----------------------- End of diff -----------------------


More information about the Changes mailing list