Browse Source

Ticket #3603: configure.ac: proper AC_INIT and AM_INIT_AUTOMAKE usage.

Fix deprecate warning
configure.ac:13: warning: AM_INIT_AUTOMAKE: two- and three-arguments forms are deprecated.  For more info, see:
configure.ac:13: http://www.gnu.org/software/automake/manual/automake.html#Modernize-AM_005fINIT_005fAUTOMAKE-invocation

Support of m4_esyscmd_s() since autoconf-2.64 (release 2009-07-26).

Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Andreas Mohr 4 years ago
parent
commit
1409eddde3
5 changed files with 12 additions and 11 deletions
  1. 8 4
      configure.ac
  2. 1 1
      doc/HACKING
  3. 1 1
      doc/INSTALL
  4. 1 5
      m4.include/mc-version.m4
  5. 1 0
      maint/utils/version.sh

+ 8 - 4
configure.ac

@@ -2,18 +2,22 @@ dnl
 dnl Configure.in file for the Midnight Commander
 dnl
 
-AC_PREREQ(2.60)
-AC_INIT([GNU Midnight Commander], [], [mc-devel@gnome.org])
+dnl 2.64 is required at least for m4_esyscmd_s()
+AC_PREREQ(2.64)
+AC_INIT([GNU Midnight Commander], m4_esyscmd_s([maint/utils/version.sh .]),
+        [https://www.midnight-commander.org/wiki/NewTicket], [mc],
+        [https://www.midnight-commander.org/])
 m4_pattern_forbid(MC_)
 AC_CONFIG_MACRO_DIR([m4])
 AC_CONFIG_AUX_DIR(config)
 AC_CONFIG_SRCDIR(src/main.c)
 AC_CONFIG_HEADERS(config.h)
-mc_VERSION
-AM_INIT_AUTOMAKE(mc, ${VERSION} )
+AM_INIT_AUTOMAKE
 dnl Enable silent rules by default (if yes)
 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
 
+mc_VERSION
+
 AM_MAINTAINER_MODE
 
 AC_CANONICAL_HOST

+ 1 - 1
doc/HACKING

@@ -16,7 +16,7 @@ Compiling from GIT
 To compile GNU Midnight commander from GIT, the following software is
 required:
 
-Autoconf 2.60 and above (latest is recommended)
+Autoconf 2.64 and above (latest is recommended)
 Automake 1.12 and above (latest is recommended)
 Gettext 0.18.1 and above
 Glib 2.30 and above

+ 1 - 1
doc/INSTALL

@@ -12,7 +12,7 @@ Build requirements for GNU Midnight Commander
 - glibc
 - gcc
 - make
-- autoconf >= 2.60
+- autoconf >= 2.64
 - automake >= 1.12
 - libtool
 - glib2 >= 2.30

+ 1 - 5
m4.include/mc-version.m4

@@ -3,21 +3,17 @@ dnl
 dnl Get current version of Midnight Commander from git tags
 dnl
 dnl @author Slava Zanko <slavazanko@gmail.com>
-dnl @version 2021-03-13
+dnl @version 2021-03-20
 dnl @license GPL
 dnl @copyright Free Software Foundation, Inc.
 dnl @modified Andrew Borodin <aborodin@vmail.ru>
 
 AC_DEFUN([mc_VERSION],[
-    if test ! -f ${srcdir}/version.h; then
-        ${srcdir}/maint/utils/version.sh ${srcdir}
-    fi
     if test -f ${srcdir}/version.h; then
         VERSION=$(grep '^#define MC_CURRENT_VERSION' ${srcdir}/version.h | sed 's/.*"\(.*\)"$/\1/')
     else
         VERSION="unknown"
     fi
-    AC_SUBST(VERSION)
 
     dnl Version without dashes for the man page
     DISTR_VERSION=`echo $VERSION | sed 's/^\([[^\-]]*\).*/\1/'`

+ 1 - 0
maint/utils/version.sh

@@ -42,6 +42,7 @@ mc_print_version(){
 #endif
 EOF
     fi
+    echo "${CURR_MC_VERSION}"
     exit
 }