AC_DEFUN([SMB_CHECK],
[
AC_REQUIRE([KDE_CHECK_LARGEFILE])
have_libsmbclient=yes
KDE_CHECK_HEADER(libsmbclient.h, ,[have_libsmbclient=no] )
KDE_CHECK_LIB(smbclient, smbc_new_context, [] ,[have_libsmbclient=no])

AM_CONDITIONAL(include_kioslave_smb, test "$have_libsmbclient" = yes)

SMBCLIENT_EXTRA_LIBS=""
AC_CHECK_FUNC(yp_get_default_domain, [],
  [
     KDE_CHECK_LIB(nsl, yp_get_default_domain, 
           [SMBCLIENT_EXTRA_LIBS="-lnsl"] )
  ])

AC_SUBST(SMBCLIENT_EXTRA_LIBS)
])

SMB_CHECK
