diff options
author | Günther Deschner <gd@samba.org> | 2010-01-12 17:42:00 +0100 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2010-01-14 19:48:29 +0100 |
commit | d95ad11bc583c99f9bf8faeac7935880da19684b (patch) | |
tree | 3796dd38b0675ce6ee0110950089bf7345693c26 /source4/torture/libsmbclient/config.m4 | |
parent | 8573471154d63644bc581d0b6a80f73927ca3e93 (diff) | |
download | samba-d95ad11bc583c99f9bf8faeac7935880da19684b.tar.gz samba-d95ad11bc583c99f9bf8faeac7935880da19684b.tar.bz2 samba-d95ad11bc583c99f9bf8faeac7935880da19684b.zip |
s4-smbtorture: add rather simple libsmbclient torture testsuite.
Guenther
Diffstat (limited to 'source4/torture/libsmbclient/config.m4')
-rw-r--r-- | source4/torture/libsmbclient/config.m4 | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/source4/torture/libsmbclient/config.m4 b/source4/torture/libsmbclient/config.m4 new file mode 100644 index 0000000000..a53b4d6b35 --- /dev/null +++ b/source4/torture/libsmbclient/config.m4 @@ -0,0 +1,34 @@ +############################### +# start SMB_EXT_LIB_LIBSMBCLIENT +# check for libsmbclient.h and -lsmbclient + +use_libsmbclient=auto +AC_ARG_ENABLE(libsmbclient, +AS_HELP_STRING([--enable-libsmbclient],[Turn on libsmbclient support (default=auto)]), + [if test x$enable_libsmbclient = xno; then + use_libsmbclient=no + fi]) + + +#if test x$use_libsmbclient = xauto && pkg-config --exists libsmbclient; then +# SMB_EXT_LIB_FROM_PKGCONFIG(LIBSMBCLIENT, libsmbclient < 0.1, +# [use_libsmbclient=yes], +# [use_libsmbclient=no]) +#fi + +SMB_ENABLE(TORTURE_LIBSMBCLIENT,NO) +if test x$use_libsmbclient != xno; then + AC_CHECK_HEADERS(libsmbclient.h) + AC_CHECK_LIB_EXT(smbclient, SMBCLIENT_LIBS, smbc_new_context) + AC_CHECK_LIB_EXT(smbclient, SMBCLIENT_LIBS, smbc_getOptionNoAutoAnonymousLogin) + if test x"$ac_cv_header_libsmbclient_h" = x"yes" -a x"$ac_cv_lib_ext_smbclient_smbc_new_context" = x"yes" -a x"$ac_cv_lib_ext_smbclient_smbc_getOptionNoAutoAnonymousLogin" = x"yes"; then + AC_DEFINE(ENABLE_LIBSMBCLIENT,1,[Whether we have libsmbclient on the host system]) + SMB_ENABLE(SMBCLIENT,YES) + SMB_ENABLE(TORTURE_LIBSMBCLIENT,YES) + else + if test x$use_libsmbclient != xauto; then + AC_MSG_ERROR([--enable-libsmbclient: libsmbclient not found]) + fi + fi + SMB_EXT_LIB(SMBCLIENT, $SMBCLIENT_LIBS) +fi |