Revert "samba: simplify the configure test."
authorRémi Duraffort <ivoire@videolan.org>
Fri, 26 Jun 2009 07:56:50 +0000 (09:56 +0200)
committerRémi Duraffort <ivoire@videolan.org>
Fri, 26 Jun 2009 07:56:50 +0000 (09:56 +0200)
This reverts commit 26ad82e32be3ef852e577ab320db03e9a55f3c5a.

configure.ac

index fb9bb48..3c822c4 100644 (file)
@@ -2250,10 +2250,15 @@ dnl
 AC_ARG_ENABLE(smb,
   [  --enable-smb            smb input module (default enabled)])
 if test "${enable_smb}" != "no"; then
-  AC_CHECK_HEADERS(libsmbclient.h, [
-    VLC_ADD_PLUGIN([access_smb])
-    VLC_ADD_LIBS([access_smb],[-lsmbclient])
-  ],[AC_MSG_ERROR([cannot find libsmbclient headers])])
+  AC_CHECK_HEADERS(libsmbclient.h,
+    [ VLC_ADD_PLUGIN([access_smb])
+      VLC_ADD_LIBS([access_smb],[-lsmbclient]) ],
+    [ if test -n "${enable_smb}"; then
+        AC_MSG_ERROR([cannot find libsmbclient headers])
+     fi ])
+  AC_CHECK_MEMBER([struct _SMBCCTX.close_fn],
+    AC_DEFINE([HAVE__SMBCCTX_CLOSE_FN], 1, [Define if samba has _SMBCCTX.close_fn]),,
+    [#include <libsmbclient.h>])
 fi
 
 dnl