Patchwork configure.ac: Use AM_PROG_AR when it exists

login
register
mail settings
Submitter Keng-Yu Lin
Date June 3, 2013, 10:07 a.m.
Message ID <1370254051-6587-1-git-send-email-kengyu@canonical.com>
Download mbox | patch
Permalink /patch/248220/
State Accepted
Headers show

Comments

Keng-Yu Lin - June 3, 2013, 10:07 a.m.
The new AM_PROG_AR macro was added in automake 1.11.2.
automake warns on this. And because the -Werror flag is default in fwts,
this breaks the Saucy build.

The patch just checks if the macro is defined. If so, just use it.

Signed-off-by: Keng-Yu Lin <kengyu@canonical.com>
---
 configure.ac | 1 +
 1 file changed, 1 insertion(+)
Colin King - June 3, 2013, 10:33 a.m.
On 03/06/13 11:07, Keng-Yu Lin wrote:
> The new AM_PROG_AR macro was added in automake 1.11.2.
> automake warns on this. And because the -Werror flag is default in fwts,
> this breaks the Saucy build.
> 
> The patch just checks if the macro is defined. If so, just use it.
> 
> Signed-off-by: Keng-Yu Lin <kengyu@canonical.com>
> ---
>  configure.ac | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/configure.ac b/configure.ac
> index 77d44bf..c0411c1 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -1,5 +1,6 @@
>  	  AC_INIT([fwts],[0.1],[colin.king@canonical.com])
>            AM_INIT_AUTOMAKE([-Wall -Werror foreign])
> +          m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
>  	  AC_CANONICAL_HOST
>  	  AC_CONFIG_MACRO_DIR([m4])
>            AC_PROG_CC
> 

Ack - the conditional is useful on older releases that don't have
AM_PROG_AR defined.

Acked-by: Colin Ian King <colin.king@canonical.com>
Ivan Hu - June 4, 2013, 7:17 a.m.
On 06/03/2013 06:07 PM, Keng-Yu Lin wrote:
> The new AM_PROG_AR macro was added in automake 1.11.2.
> automake warns on this. And because the -Werror flag is default in fwts,
> this breaks the Saucy build.
>
> The patch just checks if the macro is defined. If so, just use it.
>
> Signed-off-by: Keng-Yu Lin <kengyu@canonical.com>
> ---
>   configure.ac | 1 +
>   1 file changed, 1 insertion(+)
>
> diff --git a/configure.ac b/configure.ac
> index 77d44bf..c0411c1 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -1,5 +1,6 @@
>   	  AC_INIT([fwts],[0.1],[colin.king@canonical.com])
>             AM_INIT_AUTOMAKE([-Wall -Werror foreign])
> +          m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
>   	  AC_CANONICAL_HOST
>   	  AC_CONFIG_MACRO_DIR([m4])
>             AC_PROG_CC
>

Acked-by: Ivan Hu <ivan.hu@canonical.com>

Patch

diff --git a/configure.ac b/configure.ac
index 77d44bf..c0411c1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,5 +1,6 @@ 
 	  AC_INIT([fwts],[0.1],[colin.king@canonical.com])
           AM_INIT_AUTOMAKE([-Wall -Werror foreign])
+          m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
 	  AC_CANONICAL_HOST
 	  AC_CONFIG_MACRO_DIR([m4])
           AC_PROG_CC