From 0d3811dd4831f79b62b7912c098df1b52b7e9b55 Mon Sep 17 00:00:00 2001
From: Stephen Gallagher <sgallagh@redhat.com>
Date: Tue, 15 Feb 2011 08:33:36 -0500
Subject: [PATCH] Fix specfile for RHEL5

RHEL5 uses an old libtool. We need to forcibly remove certain m4
files before running autoreconf to ensure that they get replaced
with the appropriate old versions.
---
 contrib/sssd.spec.in |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/contrib/sssd.spec.in b/contrib/sssd.spec.in
index f0e1cb1e9e4ee163d5b8572531bab37d2c138272..43e1ab9629269453e6600c7653cc72d3616793e0 100644
--- a/contrib/sssd.spec.in
+++ b/contrib/sssd.spec.in
@@ -112,7 +112,17 @@ use with ldap_default_authtok_type = obfuscated_password.
 %setup -q
 
 %build
+
+# RHEL 5 uses an old libtool, so we need to force it to reconfigure
+# This is safe to do on newer packages too, as it will just
+# gather the appropriate m4 files from the libtool package
+for i in libtool.m4  lt~obsolete.m4  ltoptions.m4  ltsugar.m4  ltversion.m4
+do
+    find . -name $i -exec rm -f {} \;
+done
+
 autoreconf -ivf
+
 %configure \
     --with-db-path=%{dbpath} \
     --with-pipe-path=%{pipepath} \
-- 
1.7.4

