[Freeipa-devel] [PATCH 0169-0170] Modernize autotools configuration

Lukas Slebodnik lslebodn at redhat.com
Wed Jul 10 08:29:35 UTC 2013


On (04/07/13 15:23), Petr Spacek wrote:
>Hello,
>
>several warnings from autotools popped up after upgrade to Fedora 19.
>Attached patches should make autotools configuration more modern.
>
>-- 
>Petr^2 Spacek

>From 07caec808e394bfcbd898905e917731cb3778e68 Mon Sep 17 00:00:00 2001
>From: Petr Spacek <pspacek at redhat.com>
>Date: Thu, 4 Jul 2013 14:04:57 +0200
>Subject: [PATCH] Add missing ar check to configure.ac.
>
>Signed-off-by: Petr Spacek <pspacek at redhat.com>
>---
> configure.ac | 1 +
> 1 file changed, 1 insertion(+)
>
>diff --git a/configure.ac b/configure.ac
>index 222e520e0aa61bca58cff81bea672fcab04355b3..b6d66de1b862a6860226a5f9ae4a3f33842e6100 100644
>--- a/configure.ac
>+++ b/configure.ac
>@@ -10,6 +10,7 @@ AC_CONFIG_HEADERS([config.h])
> AC_DISABLE_STATIC
> 
> # Checks for programs.
>+AM_PROG_AR
> AC_PROG_CC
> AC_PROG_LIBTOOL
> 
>-- 
>1.8.3.1
>

This solution is not very portable. Automake <= 1.11 does not contain this
macro.

configure.ac:14: warning: macro `AM_PROG_AR' not found in library
configure.ac:14: error: possibly undefined macro: AM_PROG_AR
      If this token and others are legitimate, please use m4_pattern_allow.
      See the Autoconf documentation.
autoreconf: /usr/bin/autoconf failed with exit status: 1

Better solution will be:
m4_ifdef([AM_PROG_AR], [AM_PROG_AR])

You can find more information about this in mail thread
http://lists.gnu.org/archive/html/automake/2012-05/msg00014.html

>From 282f9763d0b0cc63a56161b402091c9f1fe7f279 Mon Sep 17 00:00:00 2001
>From: Petr Spacek <pspacek at redhat.com>
>Date: Thu, 4 Jul 2013 14:05:57 +0200
>Subject: [PATCH] Put m4 macros from autotools to separate sub-directory.
>
>Signed-off-by: Petr Spacek <pspacek at redhat.com>
>---
> Makefile.am  | 2 ++
> configure.ac | 1 +
> 2 files changed, 3 insertions(+)
>
>diff --git a/Makefile.am b/Makefile.am
>index 8d713c44a889b6a8f1d80ba9780de1287d641227..f5ff369861e3a8fd686f3eb36934df01c38fe597 100644
>--- a/Makefile.am
>+++ b/Makefile.am
>@@ -1,3 +1,5 @@
>+ACLOCAL_AMFLAGS = -I m4
>+
> SUBDIRS = doc src
> 
> doc_DATA = README NEWS
>diff --git a/configure.ac b/configure.ac
>index b6d66de1b862a6860226a5f9ae4a3f33842e6100..dfe0ac39adcd779e9df8ba6feab723d32af20c48 100644
>--- a/configure.ac
>+++ b/configure.ac
>@@ -5,6 +5,7 @@ AM_INIT_AUTOMAKE([-Wall foreign dist-bzip2])
> 
> AC_CONFIG_SRCDIR([src/zone_manager.h])
> AC_CONFIG_HEADERS([config.h])
>+AC_CONFIG_MACRO_DIR([m4])
> 
> # Disable static libraries
> AC_DISABLE_STATIC
>-- 
>1.8.3.1
>

ACK to the 2nd patch

LS




More information about the Freeipa-devel mailing list