-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmc-3603-0001-configure.ac-proper-AC_INIT-and-AM_INIT_AUTOMAKE-usage.patch
54 lines (48 loc) · 1.95 KB
/
mc-3603-0001-configure.ac-proper-AC_INIT-and-AM_INIT_AUTOMAKE-usage.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
From 9113503862aabc2ff3fbb55eab070570f1283c19 Mon Sep 17 00:00:00 2001
From: Andreas Mohr <and@gmx.li>
Date: Sat, 2 Apr 2016 10:42:35 +0000
Subject: [PATCH] configure.ac: proper AC_INIT and AM_INIT_AUTOMAKE usage
fix AM_INIT_AUTOMAKE deprecate warning
define AC_INIT version string (version.h > git version > unknown)
define AC_INIT tarname and url (since autoconf 2.64)
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
example before:
#define PACKAGE "mc"
#define PACKAGE_BUGREPORT ""
#define PACKAGE_NAME ""
#define PACKAGE_STRING ""
#define PACKAGE_TARNAME ""
#define PACKAGE_URL ""
#define PACKAGE_VERSION ""
example after:
#define PACKAGE "mc"
#define PACKAGE_BUGREPORT "mc-devel@gnome.org"
#define PACKAGE_NAME "GNU Midnight Commander"
#define PACKAGE_STRING "GNU Midnight Commander 4.8.16-15-g50cca69"
#define PACKAGE_TARNAME "mc"
#define PACKAGE_URL "https://www.midnight-commander.org/"
#define PACKAGE_VERSION "4.8.16-15-g50cca69"
Signed-off-by: Andreas Mohr <and@gmx.li>
---
diff --git a/configure.ac b/configure.ac
index d0d8358..09ea0be 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2,15 +2,15 @@ dnl
dnl Configure.in file for the Midnight Commander
dnl
-AC_PREREQ(2.60)
-AC_INIT([GNU Midnight Commander], [], [mc-devel@gnome.org])
+AC_PREREQ(2.64)
+AC_INIT([GNU Midnight Commander], m4_esyscmd_s([sed -n 's/^#define MC_CURRENT_VERSION.*"\(.*\)"$/\1/p' version.h 2>/dev/null || git describe 2>/dev/null || echo unknown]), [mc-devel@gnome.org], [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])])