From 7148615ab8baa05b27d2e8b190beccc55c92b37a Mon Sep 17 00:00:00 2001 From: Xavier Bachelot Date: Wed, 3 Jul 2013 22:15:11 +0200 Subject: Use pkg-config to detect Samba client library. Original patch for xine-lib 1.1 from Kevin Kofler . --- m4/input.m4 | 6 ++++-- src/input/Makefile.am | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/m4/input.m4 b/m4/input.m4 index 21d7e216f..0401bd999 100644 --- a/m4/input.m4 +++ b/m4/input.m4 @@ -79,8 +79,10 @@ AC_DEFUN([XINE_INPUT_PLUGINS], [ dnl libsmbclient XINE_ARG_ENABLE([samba], [Enable support for the Samba plugin]) if test x"$enable_samba" != x"no"; then - AC_CHECK_LIB([smbclient], [smbc_init], - [AC_CHECK_HEADERS([libsmbclient.h], [have_samba=yes LIBSMBCLIENT_LIBS="-lsmbclient"])]) + PKG_CHECK_MODULES([LIBSMBCLIENT], [smbclient], + [have_samba=yes], + AC_MSG_RESULT(*** All libsmbclient dependent parts will be disabled ***)) + AC_SUBST(LIBSMBCLIENT_CFLAGS) AC_SUBST(LIBSMBCLIENT_LIBS) if test x"$hard_enable_samba" = x"yes" && test x"$have_samba" != x"yes"; then AC_MSG_ERROR([Samba support requested, but Samba not found]) diff --git a/src/input/Makefile.am b/src/input/Makefile.am index f518e9de2..804b36352 100644 --- a/src/input/Makefile.am +++ b/src/input/Makefile.am @@ -151,6 +151,7 @@ xineplug_inp_gnome_vfs_la_CFLAGS = $(AM_CFLAGS) $(GNOME_VFS_CFLAGS) xineplug_inp_smb_la_SOURCES = input_smb.c xineplug_inp_smb_la_LIBADD = $(XINE_LIB) $(LIBSMBCLIENT_LIBS) $(LTLIBINTL) +xineplug_inp_smb_la_CFLAGS = $(AM_CFLAGS) $(LIBSMBCLIENT_CFLAGS) xineplug_inp_pvr_la_SOURCES = input_pvr.c xineplug_inp_pvr_la_LIBADD = $(XINE_LIB) $(PTHREAD_LIBS) $(LTLIBINTL) -- cgit v1.2.3