]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Fix warnings on autoconf 2.70
authorPieter Lexis <pieter.lexis@powerdns.com>
Thu, 7 Jan 2021 11:53:41 +0000 (12:53 +0100)
committerPieter Lexis <pieter.lexis@powerdns.com>
Mon, 11 Jan 2021 15:23:21 +0000 (16:23 +0100)
This bumps the minimal autoconf requirement to 2.69 as well. This
version is on Ubuntu 16.04 (EOL due in 3 months) and CentOS 7.

Closes #9918

configure.ac
m4/pdns_check_flex.m4
m4/pdns_check_lmdb.m4
m4/pdns_enable_remotebackend_zeromq.m4
m4/tm-gmtoff.m4
pdns/dnsdistdist/configure.ac
pdns/recursordist/configure.ac

index 0f15838e877479d98034a21ceb18a8e308cd4525..cf4f2ffb22bfc18a4e17a481cb08c1dbd59bea69 100644 (file)
@@ -1,9 +1,10 @@
-AC_PREREQ([2.61])
+AC_PREREQ([2.69])
 
 AC_INIT([pdns], m4_esyscmd([builder-support/gen-version]))
 
 AC_CONFIG_SRCDIR([pdns/receiver.cc])
 AC_CONFIG_MACRO_DIR([m4])
+AC_USE_SYSTEM_EXTENSIONS
 AC_CONFIG_HEADERS([config.h])
 AC_CONFIG_AUX_DIR([build-aux])
 
@@ -25,7 +26,6 @@ AC_PROG_CC
 AM_PROG_CC_C_O
 PDNS_CHECK_BISON
 PDNS_CHECK_FLEX
-AC_PROG_INSTALL
 AC_PROG_MAKE_SET
 
 AC_PROG_CXX
@@ -35,10 +35,6 @@ AS_IF([test "x$CXX" = "xno" || test "x$CXX:x$GXX" = "xg++:x"],
 
 AC_LANG([C++])
 
-AC_DEFINE([_GNU_SOURCE], [1],
-  [Define _GNU_SOURCE so that we get all necessary prototypes]
-)
-
 # Warn when pkg.m4 is missing
 m4_pattern_forbid([^_?PKG_[A-Z_]+$], [*** pkg.m4 missing, please install pkg-config])
 
index e6f46d4e0f68157410f4aa06e93a8086c34f2c16..41f6ee6e145b0d57864082548a8d7d20678f44d0 100644 (file)
@@ -1,5 +1,5 @@
 AC_DEFUN([PDNS_CHECK_FLEX], [
-  AC_REQUIRE([AC_PROG_LEX])
+  AC_PROG_LEX(noyywrap)
   AC_REQUIRE([AC_PROG_EGREP])
 
   AC_CACHE_CHECK([if the lexer is flex],[pdns_cv_prog_flex],[
index f1921bde91d312cc7b04b75495b9890327735645..5a54f0739107814737ded63bc99a49edda09c89e 100644 (file)
@@ -2,7 +2,7 @@ dnl invoking this makes lmdb a requirement
 AC_DEFUN([PDNS_CHECK_LMDB], [
   AC_MSG_CHECKING([where to find the lmdb library and headers])
   AC_ARG_WITH([lmdb],
-    AC_HELP_STRING([--with-lmdb], [lmdb library to use @<:@default=auto@:>@]),[
+    AS_HELP_STRING([--with-lmdb], [lmdb library to use @<:@default=auto@:>@]),[
     with_lmdb=$withval
     ],[
     with_lmdb=auto
index b20d1b26801b80c4c54b7aa8a6749f768bebcc0d..b40c495f112c108240b161c2e5af5b189f4b2038 100644 (file)
@@ -38,7 +38,7 @@ AC_DEFUN([PDNS_ENABLE_REMOTEBACKEND_ZEROMQ],[
           CXXFLAGS="$old_CXXFLAGS"
           LDFLAGS="$old_LDFLAGS"
         ],
-        [AC_MSG_ERROR([remotebackend \"zeromq\" selected but the \"remote\" backend itself is not selected. Please add \"remote\" to your modules or dynmodules list and re-run configure!])]
+        [AC_MSG_ERROR([remotebackend "zeromq" selected but the "remote" backend itself is not selected. Please add "remote" to your modules or dynmodules list and re-run configure!])]
       )
     ]
   )
index e2655852c6b7d1c87bae614993628b219f9202b9..9c1c65d01b47700b94e7aecf39e854b3a97e7281 100644 (file)
@@ -3,12 +3,20 @@ dnl (Borrowed from the Gaim project)
 dnl The Gaim Project (now know as Pidgin) is licensed under the GPLv2
 
 AC_DEFUN([MC_TM_GMTOFF],
-[AC_REQUIRE([AC_STRUCT_TM])dnl
-AC_CACHE_CHECK([for tm_gmtoff in struct tm], ac_cv_struct_tm_gmtoff,
-[AC_TRY_COMPILE([#include <sys/types.h>
-#include <$ac_cv_struct_tm>], [struct tm tm; tm.tm_gmtoff;],
-  ac_cv_struct_tm_gmtoff=yes, ac_cv_struct_tm_gmtoff=no)])
-if test "$ac_cv_struct_tm_gmtoff" = yes; then
-  AC_DEFINE(HAVE_TM_GMTOFF, 1, [tm_gmtoff is available.])
-fi
+  [AC_REQUIRE([AC_STRUCT_TM])dnl
+  AC_CACHE_CHECK([for tm_gmtoff in struct tm],
+    ac_cv_struct_tm_gmtoff,
+    [
+      AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
+#include <sys/types.h>
+#include <$ac_cv_struct_tm>
+struct tm tm; tm.tm_gmtoff;
+      ]]),
+      ac_cv_struct_tm_gmtoff=yes,
+      ac_cv_struct_tm_gmtoff=no])
+    ]
+  )
+  if test "$ac_cv_struct_tm_gmtoff" = yes; then
+    AC_DEFINE(HAVE_TM_GMTOFF, 1, [tm_gmtoff is available.])
+  fi
 ])
index 250cf672950b4e1bcb1f204aa950ef9af3b02f08..cba6cc68536952ad4fb3de7156ef7d577c55deaf 100644 (file)
@@ -1,4 +1,4 @@
-AC_PREREQ([2.61])
+AC_PREREQ([2.69])
 
 AC_INIT([dnsdist], m4_esyscmd(build-aux/gen-version))
 AM_INIT_AUTOMAKE([foreign dist-bzip2 no-dist-gzip parallel-tests 1.11 subdir-objects])
@@ -8,7 +8,6 @@ AC_CONFIG_HEADERS([config.h])
 AC_PROG_CC
 AC_PROG_CXX
 AC_LANG([C++])
-AC_GNU_SOURCE
 
 AC_DEFINE([DNSDIST], [1],
   [This is dnsdist]
index 5b93a347dddd98f67a008ac36c67b61f43c2a165..4b05096fd2c948c2e56915e2317610cc7875d65a 100644 (file)
@@ -1,4 +1,4 @@
-AC_PREREQ([2.61])
+AC_PREREQ([2.69])
 
 AC_INIT([pdns-recursor], m4_esyscmd(build-aux/gen-version))
 AC_CONFIG_AUX_DIR([build-aux])
@@ -7,6 +7,7 @@ AM_SILENT_RULES([yes])
 AC_CONFIG_SRCDIR([pdns_recursor.cc])
 AC_CONFIG_MACRO_DIR([m4])
 
+AC_USE_SYSTEM_EXTENSIONS
 AC_CONFIG_HEADERS([config.h])
 
 AC_CANONICAL_HOST
@@ -24,8 +25,6 @@ AC_PROG_CC
 AC_PROG_CXX
 AC_LANG([C++])
 
-AC_GNU_SOURCE
-
 AC_DEFINE([RECURSOR], [1],
   [This is the PowerDNS Recursor]
 )
@@ -34,7 +33,7 @@ AC_DEFINE([RECURSOR], [1],
 m4_pattern_forbid([^_?PKG_[A-Z_]+$], [*** pkg.m4 missing, please install pkg-config])
 
 AX_CXX_COMPILE_STDCXX_17([noext], [mandatory])
-AC_PROG_LIBTOOL
+LT_INIT()
 
 PDNS_CHECK_OS
 PDNS_CHECK_NETWORK_LIBS