endef
CONFIGURE_ARGS += \
- --disable-glibtest
+ --disable-glibtest \
+ --without-gnutls
TARGET_CFLAGS += --std=gnu99 -DNODAEMON
+++ /dev/null
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -35,7 +35,7 @@ nbd_client_CFLAGS = $(client_flags) @Gnu
- nbd_client_LDADD = $(client_libs) @GnuTLS_LIBS@
- else
- nbd_client_SOURCES = $(client_srcs)
--nbd_client_CFLAGS = $(client_flags)
-+nbd_client_CFLAGS = $(client_flags) -DNOTLS -DPROG_NAME='"nbd-client"'
- nbd_client_LDADD = $(client_libs)
- endif
- endif
--- /dev/null
+--- a/configure.ac
++++ b/configure.ac
+@@ -210,7 +210,11 @@ dnl ;;
+ dnl esac
+ dnl fi
+
+-PKG_CHECK_MODULES(GnuTLS, [gnutls >= 2.12.0],[HAVE_GNUTLS=1],[HAVE_GNUTLS=0])
++AC_ARG_WITH([gnutls], AS_HELP_STRING([--with-gnutls], [Build with GnuTLS]))
++AS_IF([test "x$with_gnutls" = "xyes"], [
++ PKG_CHECK_MODULES(GnuTLS, [gnutls >= 2.12.0],[HAVE_GNUTLS=1],[HAVE_GNUTLS=0])
++])
++
+ if test x$HAVE_GNUTLS = x1; then
+ AC_DEFINE(HAVE_GNUTLS, 1, [Define to 1 if you have a GnuTLS version of 2.12 or above])
+ else
--- /dev/null
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -35,7 +35,7 @@ nbd_client_CFLAGS = $(client_flags) @Gnu
+ nbd_client_LDADD = $(client_libs) @GnuTLS_LIBS@
+ else
+ nbd_client_SOURCES = $(client_srcs)
+-nbd_client_CFLAGS = $(client_flags)
++nbd_client_CFLAGS = $(client_flags) -DNOTLS -DPROG_NAME='"nbd-client"'
+ nbd_client_LDADD = $(client_libs)
+ endif
+ endif