get rid of the mistakes I made with `make dist' in the past.
--- /dev/null
+bin_PROGRAMS = nbd-server
+EXTRA_PROGRAMS = nbd-client
+nbd_client_SOURCES = nbd-client.c cliserv.h
+nbd_server_SOURCES = nbd-server.c cliserv.h
+man1_MANS = nbd-server.1
+man8_MANS = nbd-client.8
+EXTRA_DIST = nbd.h nbd-client.8.sgml nbd-server.1.sgml gznbd winnbd
+DISTCLEANFILES = nbd-client.8 nbd-server.1
+nbd-server.1: nbd-server.1.sgml
+ docbook-to-man nbd-server.1.sgml > nbd-server.1
+nbd-client.8: nbd-client.8.sgml
+ docbook-to-man nbd-client.8.sgml > nbd-client.8
+dist-hook:
+ rm -Rf `find $(distdir) -name 'CVS' -type d -print`
+++ /dev/null
-prefix=@prefix@
-exec_prefix=@exec_prefix@
-bindir=@bindir@
-mandir=@mandir@
-srcdir=@srcdir@
-CC=@CC@
-CFLAGS=@CFLAGS@
-LIBS=@LIBS@
-LDFLAGS=@LDFLAGS@ $(LIBS)
-VPATH=@srcdir@
-INSTALL=install
-CMDS=nbd-server @BUILD_CLIENT@
-
-all: $(CMDS)
-
-nbd-client: nbd-client.o
-
-nbd-client.o: nbd-client.c cliserv.h config.h
-
-nbd-server: nbd-server.o
-
-nbd-server.o: nbd-server.c cliserv.h config.h
- $(CC) $(CFLAGS) $(FSCHOICE) -c nbd-server.c
-
-install: $(CMDS)
- strip $(CMDS)
- $(INSTALL) $(CMDS) $(bindir)/
-
-clean:
- rm -f `find . -name "*~" -o -name "*.[oa]" -o -name "\#*\#" -o -name TAGS -o -name core`
- rm -f $(CMDS)
-
-distclean: clean
- rm -f Makefile config.h config.cache config.log config.status
-
-allclean: distclean
- rm -f configure config.h.in
-
-dist: distclean
- sh -c 'X=`pwd` ; X=`basename $$X` ; cd .. ; tar czvvf /tmp/$$X.tar.gz $$X --exclude CVS --exclude tmp --exclude "*.tar.gz"'
/* Define to 1 if you have the `llseek' function. */
#undef HAVE_LLSEEK
+/* Define to 1 if you want to use a local nbd.h (not provided, must be
+ supplied by you */
+#undef HAVE_LOCAL_NBD_H
+
/* Define to 1 if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H
/* Define to 1 if Large File Support should be enabled */
#undef NBD_LFS
+/* Name of package */
+#undef PACKAGE
+
/* Define to the address where bug reports for this package should be sent. */
#undef PACKAGE_BUGREPORT
/* Define to the version of this package. */
#undef PACKAGE_VERSION
-/* Define to 1 if the C compiler supports function prototypes. */
-#undef PROTOTYPES
-
/* Define to 1 if the `setvbuf' function takes the buffering type as its
second argument and the buffer pointer as the third, as on System V before
release 3. */
/* Define to 1 if you have the ANSI C header files. */
#undef STDC_HEADERS
+/* Version number of package */
+#undef VERSION
+
/* Define to 1 if your processor stores words with the most significant byte
first (like Motorola and SPARC, unlike Intel and VAX). */
#undef WORDS_BIGENDIAN
-/* Define like PROTOTYPES; this can be used by system headers. */
-#undef __PROTOTYPES
-
/* Define to empty if `const' does not conform to ANSI C. */
#undef const
dnl Configure script for NBD system
-dnl (c) 1998 Martin Mares <mj@ucw.cz>, (c) 2000 Pavel Machek <pavel@ucw.cz>
-AC_INIT(nbd, 2.6, wouter@debian.org)
+dnl (c) 1998 Martin Mares <mj@ucw.cz>, (c) 2000 Pavel Machek <pavel@ucw.cz>,
+dnl (c) 2003-2004 Wouter Verhelst
+AC_INIT([nbd],[2.7],[wouter@debian.org])
+AM_INIT_AUTOMAKE(nbd, 2.7)
AC_ARG_ENABLE(lfs, AC_HELP_STRING([--enable-lfs],[Enable Large File Support]), [NBD_LFS=1], [NBD_LFS=0])
AC_MSG_CHECKING([whether Large File Support should be enabled])
if test $NBD_LFS -eq 1; then
AC_FUNC_SETVBUF_REVERSED
AC_MSG_CHECKING(whether client should be built)
case "`uname`" in
- *Linux*) BUILD_CLIENT=nbd-client
+ *Linux*) sbin_PROGRAMS=nbd-client
AC_MSG_RESULT(yes)
;;
*) AC_MSG_RESULT(no) ;;
AC_HEADER_SYS_WAIT
AC_TYPE_OFF_T
AC_TYPE_PID_T
-AC_SUBST(BUILD_CLIENT)
-AC_CONFIG_HEADER(config.h)
-AC_OUTPUT(Makefile)
+AC_SUBST(sbin_PROGRAMS)
+AM_CONFIG_HEADER(config.h)
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT
#include <sys/stat.h>
#include <sys/wait.h> /* wait */
#include <sys/ioctl.h>
+#include <sys/param.h>
#include <sys/mount.h> /* For BLKGETSIZE */
#include <signal.h> /* sigaction */
#include <netinet/tcp.h>