Ver Fonte

Fix stupid autoconf regression with AH_BOTTOM [1]

This fixes TCL/IPV6 detection at build time.
Fixes #50

[1] https://lists.gnu.org/archive/html/autoconf/2006-10/msg00023.html
Bryan Drewery há 14 anos atrás
pai
commit
44c9adef05
3 ficheiros alterados com 43 adições e 82 exclusões
  1. 1 41
      build/autotools/configure.ac
  2. 41 0
      src/config-sanity.h
  3. 1 41
      src/config.h.in

+ 1 - 41
build/autotools/configure.ac

@@ -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

+ 41 - 0
src/config-sanity.h

@@ -0,0 +1,41 @@
+/*
+ * 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
+

+ 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"