-SUBDIRS = . man doc tests
+SUBDIRS = . man doc tests gznbd
bin_PROGRAMS = nbd-server nbd-trdump
sbin_PROGRAMS = @NBD_CLIENT_NAME@
EXTRA_PROGRAMS = nbd-client make-integrityhuge
-nbd_client_SOURCES = nbd-client.c cliserv.h cliserv.c
-nbd_server_SOURCES = nbd-server.c cliserv.h cliserv.c lfs.h nbd.h
-nbd_trdump_SOURCES = nbd-trdump.c cliserv.h cliserv.c nbd.h
+noinst_LTLIBRARIES = libnbdsrv.la libcliserv.la
+libcliserv_la_SOURCES = cliserv.h cliserv.c
+libcliserv_la_CFLAGS = @CFLAGS@
+nbd_client_SOURCES = nbd-client.c cliserv.h
+nbd_server_SOURCES = nbd-server.c cliserv.h lfs.h nbd.h
+nbd_trdump_SOURCES = nbd-trdump.c cliserv.h nbd.h
nbd_server_CFLAGS = @CFLAGS@ @GLIB_CFLAGS@
nbd_trdump_CFLAGS = @CFLAGS@ @GLIB_CFLAGS@
-noinst_LTLIBRARIES = libnbdsrv.la
libnbdsrv_la_SOURCES = nbdsrv.c nbdsrv.h
libnbdsrv_la_CFLAGS = @CFLAGS@ @GLIB_CFLAGS@
-nbd_server_LDADD = @GLIB_LIBS@ libnbdsrv.la
+nbd_client_LDADD = libcliserv.la
+nbd_server_LDADD = @GLIB_LIBS@ libnbdsrv.la libcliserv.la
+nbd_trdump_LDADD = libcliserv.la
make_integrityhuge_SOURCES = make-integrityhuge.c cliserv.h nbd.h nbd-debug.h
-EXTRA_DIST = gznbd maketr CodingStyle autogen.sh README.md
+EXTRA_DIST = maketr CodingStyle autogen.sh README.md
]
)
+AC_ARG_ENABLE(
+ [gznbd],
+ [AS_HELP_STRING([--enable-gznbd],[Build gznbd too (nbd server with on-the-fly decompression of images)])],
+ [
+ AS_IF(
+ [test "x$enableval" = "xyes"],
+ [ENABLE_GZNBD=yes],
+ [ENABLE_GZNBD=no]
+ )
+ ],
+ [ENABLE_GZNBD=no]
+)
+
AC_PROG_CC_C99
AC_PROG_CPP
AC_PROG_INSTALL
AC_TYPE_PID_T
nbd_server_CPPFLAGS=$nbd_server_CPPFLAGS" -DSYSCONFDIR='\"$sysconfdir\"'"
AC_SUBST(nbd_server_CPPFLAGS)
+AM_CONDITIONAL(GZNBD, [test "x$ENABLE_GZNBD" = "xyes"])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_FILES([Makefile
doc/Doxyfile
doc/Makefile
man/Makefile
+ gznbd/Makefile
tests/Makefile
tests/code/Makefile
tests/run/Makefile