From 0d9b93765ffa815ca3ddab9077302da67defe5fb Mon Sep 17 00:00:00 2001
From: Romain Bouvier <skunnyk@alteroot.org>
Date: Fri, 8 Jan 2021 10:22:48 +0000
Subject: [PATCH] Update obsolete m4 macros

- They are obsolete since 2.69, and 2.70 now warn about it
- Bump minimal autoconf to 2.69 (available since 2012)
- AC_HEADER_STDC is not needed anymore: https://www.gnu.org/software/autoconf/manual/autoconf-2.70/html_node/Particular-Headers.html


(cherry picked from commit f4212358a35267c8b3fec7a4765b6b44788f212a)
---
 configure.ac             |  1 -
 m4macros/xdt-depends.m4  |  6 +++---
 m4macros/xdt-features.m4 | 13 +++++--------
 m4macros/xdt-i18n.m4     |  2 +-
 m4macros/xdt-version.m4  |  2 +-
 5 files changed, 10 insertions(+), 14 deletions(-)

diff --git a/configure.ac b/configure.ac
index cede89a..c50ec6b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -58,7 +58,6 @@ LT_INIT([disable-static])
 dnl ***************************************
 dnl *** Check for standard header files ***
 dnl ***************************************
-AC_HEADER_STDC()
 AC_CHECK_HEADERS([libintl.h locale.h memory.h stdio.h stdlib.h string.h])
 
 dnl ***********************************
diff --git a/m4macros/xdt-depends.m4 b/m4macros/xdt-depends.m4
index 3c07c90..f65d80b 100644
--- a/m4macros/xdt-depends.m4
+++ b/m4macros/xdt-depends.m4
@@ -26,7 +26,7 @@ dnl
 
 
 dnl We need recent a autoconf version
-AC_PREREQ([2.60])
+AC_PREREQ([2.69])
 
 
 
@@ -175,8 +175,8 @@ AC_DEFUN([XDT_CHECK_OPTIONAL_PACKAGE],
   AC_REQUIRE([XDT_PROG_PKG_CONFIG])
 
   AC_ARG_ENABLE([$4],
-AC_HELP_STRING([--enable-$4], [Enable checking for $5 (default=m4_default([$6], [yes]))])
-AC_HELP_STRING([--disable-$4], [Disable checking for $5]),
+AS_HELP_STRING([--enable-$4],[Enable checking for $5 (default=m4_default([$6], [yes]))])
+AS_HELP_STRING([--disable-$4],[Disable checking for $5]),
     [xdt_cv_$1_check=$enableval], [xdt_cv_$1_check=m4_default([$6], [yes])])
 
   if test x"$xdt_cv_$1_check" = x"yes"; then
diff --git a/m4macros/xdt-features.m4 b/m4macros/xdt-features.m4
index c4ba116..6f46f77 100644
--- a/m4macros/xdt-features.m4
+++ b/m4macros/xdt-features.m4
@@ -26,7 +26,7 @@ dnl
 
 
 dnl We need recent a autoconf version
-AC_PREREQ([2.60])
+AC_PREREQ([2.69])
 
 
 dnl XDT_SUPPORTED_FLAGS(VAR, FLAGS)
@@ -58,9 +58,8 @@ AC_DEFUN([XDT_FEATURE_DEBUG],
 [
   dnl weird indentation to keep output indentation correct
   AC_ARG_ENABLE([debug],
-                AC_HELP_STRING([--enable-debug@<:@=no|minimum|yes|full@:>@],
-                               [Build with debugging support @<:@default=m4_default([$1], [minimum])@:>@])
-AC_HELP_STRING([--disable-debug], [Include no debugging support]),
+                AS_HELP_STRING([--enable-debug@<:@=no|minimum|yes|full@:>@],[Build with debugging support @<:@default=m4_default([$1], [minimum])@:>@])
+AS_HELP_STRING([--disable-debug],[Include no debugging support]),
                 [enable_debug=$enableval], [enable_debug=m4_default([$1], [minimum])])
 
   AC_MSG_CHECKING([whether to build with debugging support])
@@ -135,8 +134,7 @@ dnl
 AC_DEFUN([XDT_FEATURE_VISIBILITY],
 [
   AC_ARG_ENABLE([visibility],
-                AC_HELP_STRING([--disable-visibility],
-                               [Don't use ELF visibility attributes]),
+                AS_HELP_STRING([--disable-visibility],[Don't use ELF visibility attributes]),
                 [enable_visibility=$enableval], [enable_visibility=yes])
   have_gnuc_visibility=no
   if test "x$enable_visibility" != "xno"; then
@@ -188,8 +186,7 @@ dnl
 AC_DEFUN([XDT_FEATURE_LINKER_OPTS],
 [
   AC_ARG_ENABLE([linker-opts],
-                AC_HELP_STRING([--disable-linker-opts],
-                               [Disable linker optimizations]),
+                AS_HELP_STRING([--disable-linker-opts],[Disable linker optimizations]),
                 [enable_linker_opts=$enableval], [enable_linker_opts=yes])
 
   if test "x$enable_linker_opts" != "xno"; then
diff --git a/m4macros/xdt-i18n.m4 b/m4macros/xdt-i18n.m4
index ac972c6..b2501ad 100644
--- a/m4macros/xdt-i18n.m4
+++ b/m4macros/xdt-i18n.m4
@@ -56,7 +56,7 @@ AC_DEFUN([XDT_I18N],
   AC_MSG_CHECKING([for locales directory])
   AC_ARG_WITH([locales-dir], 
   [
-    AC_HELP_STRING([--with-locales-dir=DIR], [Install locales into DIR])
+    AS_HELP_STRING([--with-locales-dir=DIR],[Install locales into DIR])
   ], [localedir=$withval],
   [
     if test x"$CATOBJEXT" = x".mo"; then
diff --git a/m4macros/xdt-version.m4 b/m4macros/xdt-version.m4
index 39d08ff..e16311c 100644
--- a/m4macros/xdt-version.m4
+++ b/m4macros/xdt-version.m4
@@ -45,7 +45,7 @@ dnl
 dnl Example usage:
 dnl
 dnl XDT_VERSION_INIT([4.15.3],[git])
-dnl AC_INIT([xfce4-someproject], [xdt_version()])
+dnl AC_INIT([xfce4-someproject],[xdt_version()])
 dnl ...
 dnl XDT_FEATURE_DEBUG([xdt_debug_default])
 dnl
-- 
GitLab