Jelajahi Sumber

Merge branch '50-missing-tcl' into maint

* 50-missing-tcl:
  Update DOCS
  Remove invalid references to gethostname/getipnodebyname
  Fix stupid autoconf regression with AH_BOTTOM [1]

Conflicts:
	doc/UPDATES
Bryan Drewery 13 tahun lalu
induk
melakukan
afe9213f7f
6 mengubah file dengan 41 tambahan dan 88 penghapusan
  1. 2 42
      build/autotools/configure.ac
  2. 0 2
      build/autotools/includes/acinclude.m4
  3. 1 3
      configure
  4. 1 0
      doc/UPDATES
  5. 36 0
      src/config-sanity.h
  6. 1 41
      src/config.h.in

+ 2 - 42
build/autotools/configure.ac

@@ -203,7 +203,7 @@ AC_CHECK_FUNCS([strcasecmp strncasecmp vsnprintf])
 
 #autoscan suggested this....
 #These are recommended by autoscan, but no code supports it currently
-#AC_CHECK_FUNCS([alarm bzero dup2 getcwd gethostbyaddr gethostbyname gethostname getpass gettimeofday mbrlen
+#AC_CHECK_FUNCS([alarm bzero dup2 getcwd gethostbyaddr gethostname getpass gettimeofday mbrlen
 #mkdir munmap realpath select setlocale socket strchr strerror strpbrk strrchr strstr strtol tzset])
 
 EGG_CHECK_FUNC_VSPRINTF
@@ -227,47 +227,7 @@ AH_TEMPLATE(HAVE_ST_MTIM, [Define to 1 if your struct stat has an st_mtim member
 AH_TEMPLATE(HAVE_ST_MTIMESPEC, [Define to 1 if your struct stat has an st_mtimespec member])
 AH_TEMPLATE(HAVE_TIMESPEC, [Define to 1 if you have struct timespec in sys/time.h])
 AH_TEMPLATE(HAVE_TIMESPECSUB2, [Define to 1 if you have a timespecsub macro or function that takes two arguments (not three)])
-AH_BOTTOM([/*
- * Macros to pull sec and nsec parts of mtime from struct stat.
- */
-#ifdef HAVE_ST_MTIM
-# define mtim_getsec(_x)        ((_x).st_mtim.tv_sec)
-# define mtim_getnsec(_x)       ((_x).st_mtim.tv_nsec)
-#else
-# ifdef HAVE_ST_MTIMESPEC
-#  define mtim_getsec(_x)       ((_x).st_mtimespec.tv_sec)
-#  define mtim_getnsec(_x)      ((_x).st_mtimespec.tv_nsec)
-# else
-#  define mtim_getsec(_x)       ((_x).st_mtime)
-#  define mtim_getnsec(_x)      (0)
-# endif /* HAVE_ST_MTIMESPEC */
-#endif /* HAVE_ST_MTIM */
-
-/*
- * Enable IPv6 debugging?
- */
-#define DEBUG_IPV6 1
-#define HAVE_IPV6 1
-
-/* IPv6 sanity checks. */
-#ifdef USE_IPV6
-#  ifndef HAVE_IPV6
-#    undef USE_IPV6
-#  endif
-#  ifndef HAVE_GETHOSTBYNAME2
-#    ifndef HAVE_GETIPNODEBYNAME
-#      undef USE_IPV6
-#    endif
-#  endif
-#endif
-
-/* TCL sanity check */
-#ifdef USE_SCRIPT_TCL
-#  ifndef HAVE_LIBTCL
-#    undef USE_SCRIPT_TCL
-#  endif
-#endif
-])
+AH_BOTTOM([#include "config-sanity.h"])
 
 [
 GIT_REQUIRED=1

+ 0 - 2
build/autotools/includes/acinclude.m4

@@ -407,8 +407,6 @@ AC_DEFUN([EGG_CHECK_LIBS],
   AC_CHECK_LIB(socket, socket)
 #  AC_CHECK_LIB(nsl, connect)
   AC_CHECK_LIB(dl, dlopen)
-#  AC_CHECK_LIB(nsl, gethostbyname)
-#  AC_CHECK_LIB(dns, gethostbyname)
 
 #  AC_CHECK_LIB(z, gzopen, ZLIB="-lz")
   # This is needed for Tcl libraries compiled with thread support

+ 1 - 3
configure

@@ -4710,8 +4710,6 @@ _ACEOF
 
 fi
 
-#  AC_CHECK_LIB(nsl, gethostbyname)
-#  AC_CHECK_LIB(dns, gethostbyname)
 
 #  AC_CHECK_LIB(z, gzopen, ZLIB="-lz")
   # This is needed for Tcl libraries compiled with thread support
@@ -8380,7 +8378,7 @@ done
 
 #autoscan suggested this....
 #These are recommended by autoscan, but no code supports it currently
-#AC_CHECK_FUNCS([alarm bzero dup2 getcwd gethostbyaddr gethostbyname gethostname getpass gettimeofday mbrlen
+#AC_CHECK_FUNCS([alarm bzero dup2 getcwd gethostbyaddr gethostname getpass gettimeofday mbrlen
 #mkdir munmap realpath select setlocale socket strchr strerror strpbrk strrchr strstr strtol tzset])
 
 

+ 1 - 0
doc/UPDATES

@@ -7,6 +7,7 @@ maint
   * Fix OPs engaging the mass flood protection
   * Fix +bitch not working under some conditions
   * Fix "+d virus" causing bots to enforce deop anyone who ops someone who opped a +d user
+  * Fix compiling without TCL support (#50)
 
 1.4.0 - http://wraith.botpack.net/milestone/1.4.0
   * Updated server list, 'set -yes servers -' and 'set -yes servers6 -' to get new list.

+ 36 - 0
src/config-sanity.h

@@ -0,0 +1,36 @@
+/*
+ * Macros to pull sec and nsec parts of mtime from struct stat.
+ */
+#ifdef HAVE_ST_MTIM
+# define mtim_getsec(_x)        ((_x).st_mtim.tv_sec)
+# define mtim_getnsec(_x)       ((_x).st_mtim.tv_nsec)
+#else
+# ifdef HAVE_ST_MTIMESPEC
+#  define mtim_getsec(_x)       ((_x).st_mtimespec.tv_sec)
+#  define mtim_getnsec(_x)      ((_x).st_mtimespec.tv_nsec)
+# else
+#  define mtim_getsec(_x)       ((_x).st_mtime)
+#  define mtim_getnsec(_x)      (0)
+# endif /* HAVE_ST_MTIMESPEC */
+#endif /* HAVE_ST_MTIM */
+
+/*
+ * Enable IPv6 debugging?
+ */
+#define DEBUG_IPV6 1
+#define HAVE_IPV6 1
+
+/* IPv6 sanity checks. */
+#ifdef USE_IPV6
+#  ifndef HAVE_IPV6
+#    undef USE_IPV6
+#  endif
+#endif
+
+/* TCL sanity check */
+#ifdef USE_SCRIPT_TCL
+#  ifndef HAVE_LIBTCL
+#    undef USE_SCRIPT_TCL
+#  endif
+#endif
+

+ 1 - 41
src/config.h.in

@@ -437,44 +437,4 @@
    code using `volatile' can become incorrect without. Disable with care. */
 #undef volatile
 
-/*
- * Macros to pull sec and nsec parts of mtime from struct stat.
- */
-#ifdef HAVE_ST_MTIM
-# define mtim_getsec(_x)        ((_x).st_mtim.tv_sec)
-# define mtim_getnsec(_x)       ((_x).st_mtim.tv_nsec)
-#else
-# ifdef HAVE_ST_MTIMESPEC
-#  define mtim_getsec(_x)       ((_x).st_mtimespec.tv_sec)
-#  define mtim_getnsec(_x)      ((_x).st_mtimespec.tv_nsec)
-# else
-#  define mtim_getsec(_x)       ((_x).st_mtime)
-#  define mtim_getnsec(_x)      (0)
-# endif /* HAVE_ST_MTIMESPEC */
-#endif /* HAVE_ST_MTIM */
-
-/*
- * Enable IPv6 debugging?
- */
-#define DEBUG_IPV6 1
-#define HAVE_IPV6 1
-
-/* IPv6 sanity checks. */
-#ifdef USE_IPV6
-#  ifndef HAVE_IPV6
-#    undef USE_IPV6
-#  endif
-#  ifndef HAVE_GETHOSTBYNAME2
-#    ifndef HAVE_GETIPNODEBYNAME
-#      undef USE_IPV6
-#    endif
-#  endif
-#endif
-
-/* TCL sanity check */
-#ifdef USE_SCRIPT_TCL
-#  ifndef HAVE_LIBTCL
-#    undef USE_SCRIPT_TCL
-#  endif
-#endif
-
+#include "config-sanity.h"