[Freeipa-devel] [PATCH] build tweaks

Nalin Dahyabhai nalin at redhat.com
Wed Nov 24 22:46:18 UTC 2010


The attached patch modifies autogen.sh so that it runs autoreconf with
the -f flag, too, so that a source rpm package built on an F14 system
will successfully build on a system which has older autotools versions.

It also tells automake to run in its 'foreign' mode and dispenses with
some workarounds for when we were running it in 'gnu' mode.

Nalin
-------------- next part --------------
>From 5bb5c58a0ac713069fbd44cb8b7906485648de13 Mon Sep 17 00:00:00 2001
From: Nalin Dahyabhai <nalin at redhat.com>
Date: Wed, 24 Nov 2010 17:39:46 -0500
Subject: [PATCH] build tweaks
 - use automake's foreign mode, avoid creating empty files to satisfy gnu mode
 - run autoreconf -f to ensure that everything matches

---
 autogen.sh                 |   13 +------------
 contrib/RHEL4/configure.ac |    2 +-
 daemons/configure.ac       |    2 +-
 install/configure.ac       |    2 +-
 ipa-client/configure.ac    |    2 +-
 ipa.spec.in                |    4 ----
 6 files changed, 5 insertions(+), 20 deletions(-)

diff --git a/autogen.sh b/autogen.sh
index 99b4805..5eab4a4 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -1,14 +1,3 @@
 #!/bin/sh
-
-# automake demands these files exist when run in gnu mode which is the default,
-# automake can be run in foreign mode to avoid failing on the absence of these
-# files, but unfortunately there is no way to pass the --foreign flag to
-# automake when run from autoreconf.
-for f in NEWS README AUTHORS ChangeLog; do
-    if [ ! -e $f ]; then
-        touch $f
-    fi
-done
-
-autoreconf -i
+autoreconf -i -f
 ./configure ${1+"$@"}
diff --git a/contrib/RHEL4/configure.ac b/contrib/RHEL4/configure.ac
index 83676a3..1fd3fd2 100644
--- a/contrib/RHEL4/configure.ac
+++ b/contrib/RHEL4/configure.ac
@@ -3,7 +3,7 @@ AC_INIT([ipa-client],
         [0.99.0],
         [http://www.freeipa.org/])
 
-AM_INIT_AUTOMAKE
+AM_INIT_AUTOMAKE([foreign])
 
 AC_SUBST(VERSION)
 
diff --git a/daemons/configure.ac b/daemons/configure.ac
index da86557..d959f98 100644
--- a/daemons/configure.ac
+++ b/daemons/configure.ac
@@ -6,7 +6,7 @@ AC_INIT([ipa-server],
 
 AC_CONFIG_HEADERS([config.h])
 
-AM_INIT_AUTOMAKE
+AM_INIT_AUTOMAKE([foreign])
 
 AM_MAINTAINER_MODE
 AC_PROG_CC
diff --git a/install/configure.ac b/install/configure.ac
index 5cdfb79..2424ef2 100644
--- a/install/configure.ac
+++ b/install/configure.ac
@@ -7,7 +7,7 @@ AC_INIT([ipa-server],
 #AC_CONFIG_SRCDIR([ipaserver/ipaldap.py])
 AC_CONFIG_HEADERS([config.h])
 
-AM_INIT_AUTOMAKE
+AM_INIT_AUTOMAKE([foreign])
 
 AM_MAINTAINER_MODE
 #AC_PROG_CC
diff --git a/ipa-client/configure.ac b/ipa-client/configure.ac
index 95becd3..75544ae 100644
--- a/ipa-client/configure.ac
+++ b/ipa-client/configure.ac
@@ -9,7 +9,7 @@ AC_PROG_LIBTOOL
 AC_CONFIG_SRCDIR([ipaclient/__init__.py])
 AC_CONFIG_HEADERS([config.h])
 
-AM_INIT_AUTOMAKE
+AM_INIT_AUTOMAKE([foreign])
 
 AM_MAINTAINER_MODE
 
diff --git a/ipa.spec.in b/ipa.spec.in
index b43aa8e..775c52e 100644
--- a/ipa.spec.in
+++ b/ipa.spec.in
@@ -223,10 +223,6 @@ administering radius authentication settings in IPA.
 export CFLAGS="$CFLAGS %{optflags}"
 export CPPFLAGS="$CPPFLAGS %{optflags}"
 make version-update
-%if ! %{ONLY_CLIENT}
-touch daemons/NEWS daemons/README daemons/AUTHORS daemons/ChangeLog
-touch install/NEWS install/README install/AUTHORS install/ChangeLog
-%endif
 cd ipa-client; ../autogen.sh --prefix=%{_usr} --sysconfdir=%{_sysconfdir} --localstatedir=%{_localstatedir} --libdir=%{_libdir} --mandir=%{_mandir}; cd ..
 %if ! %{ONLY_CLIENT}
 cd daemons; ../autogen.sh --prefix=%{_usr} --sysconfdir=%{_sysconfdir} --localstatedir=%{_localstatedir} --libdir=%{_libdir} --mandir=%{_mandir}; cd ..
-- 
1.7.3.2



More information about the Freeipa-devel mailing list