aboutsummaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2013-11-01 09:25:22 +0100
committerwsnipex <wsnipex@a1.net>2013-11-01 09:32:35 +0100
commit21b4b864dc24ecf41ab3e93847d0d5b009301834 (patch)
tree3d3869390c10d1601c6604078c01818308b15284 /configure.in
parentc3999599939021778a33757429d61d92f150ece7 (diff)
configure: use pkgconfig to detect samba
Recent Samba versions require pkg-config. We try that first but fall back to old behaviour if smbclient.pc is missing. This solves also an 'issue' with samba4 that correctly detects the libsmbclient in the link test in configure, but fails to compile later due to missing headers. Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in9
1 files changed, 6 insertions, 3 deletions
diff --git a/configure.in b/configure.in
index fa872e882b..2743bd224d 100644
--- a/configure.in
+++ b/configure.in
@@ -1522,9 +1522,12 @@ fi
# samba
if test "x$use_samba" != "xno"; then
- AC_CHECK_LIB([smbclient], [main],,
- use_samba=no;AC_MSG_ERROR($missing_library))
- USE_LIBSMBCLIENT=0
+ PKG_CHECK_MODULES([SAMBA], [smbclient],
+ [INCLUDES="$INCLUDES $SAMBA_CFLAGS"; LIBS="$LIBS $SAMBA_LIBS"],
+ [AC_CHECK_LIB([smbclient], [main],,
+ use_samba=no;AC_MSG_ERROR($missing_library))
+ USE_LIBSMBCLIENT=0
+ ])
else
AC_MSG_RESULT($samba_disabled)
USE_LIBSMBCLIENT=0