[Freeipa-devel] [PATCH] 0081 Support both unified samba and samba/samba4-packages

Alexander Bokovoy abokovoy at redhat.com
Mon Oct 1 09:24:51 UTC 2012


Hi,

The patch attached fixes Fedora build system issue with unified samba
package (samba/samba4 packages got merged in Fedora 18 and Rawhide
recently) since we depend on a wbclient.h header file path to which
included versioned directory name previously (samba-4.0/ vs samba/).
-- 
/ Alexander Bokovoy
-------------- next part --------------
>From 45a8c7255199dc3b8bf1c0bbb6c4535abf75c899 Mon Sep 17 00:00:00 2001
From: Alexander Bokovoy <abokovoy at redhat.com>
Date: Mon, 1 Oct 2012 12:18:36 +0300
Subject: [PATCH 2/2] Support both unified samba and samba/samba4 packages for
 wbclient.h

Fedora 18 (and beyond) has moved to unified samba package, while
previous versions and RHEL 6.x are still using separate samba and samba4
packages.

We need to access wbclient.h header which may now be either samba-4.0/wbclient.h
or samba/wbclient.h depending on a setup.

This patch fixes the issue found by Fedora build system.
---
 daemons/configure.ac                                    |  8 ++++++--
 daemons/ipa-slapi-plugins/ipa-extdom-extop/ipa_extdom.h | 10 +++++++++-
 2 files changed, 15 insertions(+), 3 deletions(-)

diff --git a/daemons/configure.ac b/daemons/configure.ac
index ebf625ebffd8a92e0a3b050955b9376e002ed6c9..581d5640221b3ba29bf85620d3bf742ceffb3cfb 100644
--- a/daemons/configure.ac
+++ b/daemons/configure.ac
@@ -241,8 +241,12 @@ PKG_CHECK_MODULES([SAMBAUTIL], [samba-util])
 SAMBA40EXTRA_LIBPATH="-L`$PKG_CONFIG --variable=libdir samba-util`/samba -Wl,-rpath=`$PKG_CONFIG --variable=libdir samba-util`/samba"
 AC_SUBST(SAMBA40EXTRA_LIBPATH)
 AC_CHECK_HEADERS([samba-4.0/wbclient.h],
-                 ,
-                 [AC_MSG_ERROR([samba-4.0/wbclient.h not found])],
+		 ,
+		 [AC_CHECK_HEADERS([samba/wbclient.h],
+				   ,
+		                   [AC_MSG_ERROR([samba/wbclient.h not found])],
+		                   [#include <stdbool.h>
+		                    #include <stdint.h>])],
                  [#include <stdbool.h>
                   #include <stdint.h>])
 AC_CHECK_LIB([wbclient],
diff --git a/daemons/ipa-slapi-plugins/ipa-extdom-extop/ipa_extdom.h b/daemons/ipa-slapi-plugins/ipa-extdom-extop/ipa_extdom.h
index 5c2eeddceb3983fa5793c1a7fa86c5001c47beba..f6fd0aaa2dacb037dbdda49fa7454fd6bbd1aaab 100644
--- a/daemons/ipa-slapi-plugins/ipa-extdom-extop/ipa_extdom.h
+++ b/daemons/ipa-slapi-plugins/ipa-extdom-extop/ipa_extdom.h
@@ -54,7 +54,15 @@
 #include <stdlib.h>
 #include <stdint.h>
 
-#include <samba-4.0/wbclient.h>
+#ifdef HAVE_SAMBA_4_0_WBCLIENT_H
+#  include <samba-4.0/wbclient.h>
+#else
+#  ifdef HAVE_SAMBA_WBCLIENT_H
+#    include <samba/wbclient.h>
+#  else
+#    error "wbclient.h header from Samba was not found"
+#  endif
+#endif
 
 #include <dirsrv/slapi-plugin.h>
 #include <lber.h>
-- 
1.7.12



More information about the Freeipa-devel mailing list