From ea9407fc4ae72a5d4245cbb25f7429f46d664d23 Mon Sep 17 00:00:00 2001 From: Jeff Layton Date: Sun, 15 Apr 2012 08:11:53 -0400 Subject: autoconf: fix tests for wbclient to use pkgconfig Use the pkgconfig file that's included with wbclient to perform the test for wbclient usability, and to set the correct CFLAGS and LDADD. This is particularly necessary on recent Fedora with samba4 since it puts the wbclient.h file in a different directory than before. Also, remove a redundant test for wbclient.h from configure.ac. Signed-off-by: Jeff Layton --- aclocal/idmap.m4 | 37 +++---------------------------------- 1 file changed, 3 insertions(+), 34 deletions(-) (limited to 'aclocal/idmap.m4') diff --git a/aclocal/idmap.m4 b/aclocal/idmap.m4 index ada73f0..70a0649 100644 --- a/aclocal/idmap.m4 +++ b/aclocal/idmap.m4 @@ -1,33 +1,8 @@ -dnl Headers needed by wbclient.h -dnl -AC_DEFUN([AC_WBCH_COMPL],[ -[ -#ifdef HAVE_STDINT_H -#include -#endif -] -[#ifdef HAVE_STDBOOL_H -#include -#endif -] -[#ifdef HAVE_STDIO_H -#include -#endif -] -[#ifdef HAVE_STDLIB_H -#include -#endif -] -[#ifdef HAVE_ERRNO_H -#include -#endif -]]) - -dnl Check for wbclient.h header and libwbclient.so +dnl Check for wbclient package dnl AC_DEFUN([AC_TEST_WBCHL],[ if test $enable_cifsidmap != "no" -o $enable_cifsacl != "no"; then - AC_CHECK_HEADERS([wbclient.h], , [ + PKG_CHECK_MODULES(WBCLIENT, wbclient, , [ if test "$enable_cifsidmap" = "yes"; then AC_MSG_ERROR([wbclient.h not found, consider installing libwbclient-devel.]) else @@ -40,7 +15,7 @@ if test $enable_cifsidmap != "no" -o $enable_cifsacl != "no"; then AC_MSG_WARN([wbclient.h not found, consider installing libwbclient-devel. Disabling cifsacl.]) enable_cifsacl="no" fi - ], [ AC_WBCH_COMPL ]) + ]) fi if test $enable_cifsacl != "no"; then @@ -53,10 +28,4 @@ if test $enable_cifsacl != "no"; then fi ], [ ]) fi - -if test $enable_cifsidmap != "no" -o $enable_cifsacl != "no"; then - AC_CHECK_LIB([wbclient], [wbcStringToSid], - [ WINB_LDADD='-lwbclient' ] [ AC_DEFINE(HAVE_LIBWBCLIENT, 1, ["Define var have_libwbclient"]) ], [AC_MSG_ERROR([No functioning wbclient library found!])]) - AC_SUBST(WINB_LDADD) -fi ]) -- cgit v1.2.3