diff options
author | Jeff Layton <jlayton@samba.org> | 2012-04-15 08:11:53 -0400 |
---|---|---|
committer | Jeff Layton <jlayton@samba.org> | 2012-04-15 08:11:53 -0400 |
commit | ea9407fc4ae72a5d4245cbb25f7429f46d664d23 (patch) | |
tree | 635a0dbfb311aa60478ef7720c4733676c32b072 /aclocal/idmap.m4 | |
parent | fd31a7c0ba7f1282d2d81193d4d100fdc926b99b (diff) | |
download | cifs-utils-ea9407fc4ae72a5d4245cbb25f7429f46d664d23.tar.gz cifs-utils-ea9407fc4ae72a5d4245cbb25f7429f46d664d23.tar.bz2 cifs-utils-ea9407fc4ae72a5d4245cbb25f7429f46d664d23.zip |
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 <jlayton@samba.org>
Diffstat (limited to 'aclocal/idmap.m4')
-rw-r--r-- | aclocal/idmap.m4 | 37 |
1 files changed, 3 insertions, 34 deletions
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 <stdint.h> -#endif -] -[#ifdef HAVE_STDBOOL_H -#include <stdbool.h> -#endif -] -[#ifdef HAVE_STDIO_H -#include <stdio.h> -#endif -] -[#ifdef HAVE_STDLIB_H -#include <stdlib.h> -#endif -] -[#ifdef HAVE_ERRNO_H -#include <errno.h> -#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 ]) |