summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Larsson <alexl@redhat.com>2012-10-17 10:52:56 +0200
committerAlexander Larsson <alexl@redhat.com>2012-10-17 10:52:56 +0200
commit82d369758beba0c62f4e7d9d77b57784b38f6f9d (patch)
treeb2a05c70d4cd42af56501488a5d83473d16bd08d
parent228c7abbba8e4fe3a8d46bc4077b12232118a5ec (diff)
downloadgvfs-82d369758beba0c62f4e7d9d77b57784b38f6f9d.tar.gz
Find libsmbclient with samba 4
Samba 4 put libsmbclient.h in a subdir and added a smbclient.pc file to let us find it. Use it if it exists, falling back on the old code.
-rw-r--r--configure.ac13
1 files changed, 8 insertions, 5 deletions
diff --git a/configure.ac b/configure.ac
index 4062a930..e3dde83b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -496,28 +496,31 @@ AM_CONDITIONAL(HAVE_BLURAY, [test "$msg_bluray" = "yes"])
dnl ==========================================================================
dnl Samba 3.0
+dnl Samba 4 ships a pc file and requires a non-default include subdir, so pick it up:
+PKG_CHECK_MODULES(SMBCLIENT, smbclient, samba_default_cflags="$SMBCLIENT_CFLAGS",samba_default_cflags=-I/usr/include)
+
AC_ARG_ENABLE(samba, AS_HELP_STRING([--disable-samba],[build without samba support]))
msg_samba="no"
if test "x$enable_samba" != "xno"; then
AC_ARG_WITH(samba-includes, AS_HELP_STRING([--with-samba-includes=PREFIX],[Location of samba includes.]),
- with_samba_includes="$withval", with_samba_includes="/usr/include")
+ with_samba_includes="-I$withval", with_samba_includes=${samba_default_cflags})
have_samba_includes="no"
- if test "x${with_samba_includes}" != "xno"; then
+ if test "x${with_samba_includes}" != "x-Ino"; then
CPPFLAGS_save="$CPPFLAGS"
- CPPFLAGS="$CPPFLAGS -I$with_samba_includes"
+ CPPFLAGS="$CPPFLAGS $with_samba_includes"
AC_CHECK_HEADER(libsmbclient.h, [ samba_includes="yes" ])
CPPFLAGS="$CPPFLAGS_save"
if test "x{samba_includes}" != "xno" -a "x${samba_includes}" != "x"; then
have_samba_includes="yes"
if test "${with_samba_includes}" != "/usr/include" ; then
- SAMBA_CFLAGS="-I$with_samba_includes"
+ SAMBA_CFLAGS="$with_samba_includes"
else
SAMBA_CFLAGS=""
fi
- CPPFLAGS="$CPPFLAGS -I$with_samba_includes"
+ CPPFLAGS="$CPPFLAGS $with_samba_includes"
AC_CHECK_MEMBER(SMBCCTX.flags,
[AC_DEFINE(HAVE_SAMBA_FLAGS,, [Defined if flags available in SMBCCTXT])],,
[#include <libsmbclient.h>])