[vlc-devel] [PATCH] Switch detection of smbclient from header to pkgconfig

Nicolas Chauvet kwizart at gmail.com
Fri Mar 1 19:35:44 CET 2013


---
 configure.ac              | 7 +++----
 modules/access/Modules.am | 4 ++--
 2 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/configure.ac b/configure.ac
index 65377ac..d17986e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1874,11 +1874,10 @@ dnl
 AC_ARG_ENABLE(smb,
   [AS_HELP_STRING([--disable-smb], [disable SMB/CIFS support (default auto)])])
 if test "${enable_smb}" != "no"; then
-  AC_CHECK_HEADERS(libsmbclient.h,
-    [ VLC_ADD_PLUGIN([access_smb])
-      VLC_ADD_LIBS([access_smb],[-lsmbclient]) ],
+  PKG_CHECK_MODULES(SMBCLIENT, smbclient,
+    [ VLC_ADD_PLUGIN([access_smb]) ],
     [ if test -n "${enable_smb}"; then
-        AC_MSG_ERROR([cannot find libsmbclient headers])
+        AC_MSG_ERROR([${SMBCLIENT_PKG_ERRORS} (required for smb plugin).])
      fi ])
 fi
 
diff --git a/modules/access/Modules.am b/modules/access/Modules.am
index ff6047e..6015f67 100644
--- a/modules/access/Modules.am
+++ b/modules/access/Modules.am
@@ -35,8 +35,8 @@ libsdp_plugin_la_LIBADD = $(AM_LIBADD)
 libsdp_plugin_la_DEPENDENCIES =
 
 libaccess_smb_plugin_la_SOURCES = smb.c
-libaccess_smb_plugin_la_CFLAGS = $(AM_CFLAGS)
-libaccess_smb_plugin_la_LIBADD = $(AM_LIBADD) $(LIBS_access_smb)
+libaccess_smb_plugin_la_CFLAGS = $(AM_CFLAGS) $(SMBCLIENT_CFLAGS)
+libaccess_smb_plugin_la_LIBADD = $(AM_LIBADD) $(SMBCLIENT_LIBS)
 if HAVE_WIN32
 libaccess_smb_plugin_la_LIBADD += -lmpr
 endif
-- 
1.7.11.7




More information about the vlc-devel mailing list