--- xbmc/configure.in.orig	2013-03-04 01:44:01.000000000 +0900
+++ xbmc/configure.in	2013-03-04 01:49:32.000000000 +0900
@@ -1351,8 +1351,8 @@
 
 # samba
 if test "x$use_samba" != "xno"; then
-  AC_CHECK_LIB([smbclient], [main],,
-    use_samba=no;AC_MSG_ERROR($missing_library))
+  PKG_CHECK_MODULES([SMBCLIENT],[smbclient],,
+    [use_samba="no";AC_MSG_ERROR($missing_library)])
     USE_LIBSMBCLIENT=0
 else
   AC_MSG_RESULT($samba_disabled)
@@ -1360,6 +1360,7 @@
 fi
 
 if test "x$use_samba" != "xno"; then
+  INCLUDES="$INCLUDES $SMBCLIENT_CFLAGS";LIBS="$LIBS $SMBCLIENT_LIBS"
   AC_DEFINE([HAVE_LIBSMBCLIENT], [1], [Define to 1 if you have Samba installed])
   USE_LIBSMBCLIENT=1
 fi
