1 dnl Configure script for NBD system
2 dnl (c) 1998 Martin Mares <mj@ucw.cz>, (c) 2000 Pavel Machek <pavel@ucw.cz>,
3 dnl (c) 2003-2004 Wouter Verhelst
4 AC_INIT([nbd],[2.7.8],[wouter@debian.org])
5 AM_INIT_AUTOMAKE(dist-bzip2 foreign)
11 AC_HELP_STRING([--enable-lfs],[Enable Large File Support]),
13 if test "x$enableval" = "xyes" ; then
21 AC_MSG_CHECKING([whether Large File Support should be enabled])
22 if test $NBD_LFS -eq 1; then
23 AC_DEFINE(NBD_LFS,1, [Define to 1 if Large File Support should be enabled])
32 AC_HELP_STRING([--enable-syslog],[Enable Syslog logging]),
34 if test "x$enableval" = "xyes" ; then
42 AC_MSG_CHECKING([whether syslog logging is requested])
43 if test $ISSERVER -eq 1; then
44 AC_DEFINE(ISSERVER,1, [Define to 1 if you want nbd-server to log through syslog])
50 AC_MSG_CHECKING(whether warnings should be enabled)
51 if test -n "$GCC" ; then
53 CFLAGS="$CFLAGS -Wall -W -Wno-parentheses -Wstrict-prototypes -Wno-unused"
61 AC_CHECK_SIZEOF(unsigned short int)
62 AC_CHECK_SIZEOF(unsigned int)
63 AC_CHECK_SIZEOF(unsigned long int)
64 AC_CHECK_SIZEOF(unsigned long long int)
65 AC_CHECK_FUNCS([llseek alarm gethostbyname inet_ntoa memset socket strerror strstr])
67 AC_FUNC_SETVBUF_REVERSED
68 AC_MSG_CHECKING(whether client should be built)
70 *Linux*) sbin_PROGRAMS=nbd-client
73 *) AC_MSG_RESULT(no) ;;
75 AC_MSG_CHECKING(whether there is a local nbd.h)
76 if test -f nbd.h; then
77 AC_DEFINE(HAVE_LOCAL_NBD_H,1, [Define to 1 if you want to use a local nbd.h (not provided, must be supplied by you)])
82 AC_CHECK_HEADERS([linux/nbd.h],,,
83 [[#define u32 unsigned int
84 #define u64 unsigned long int
85 #define __be32 unsigned int
86 #define __be64 unsigned long int
88 AC_CHECK_HEADERS([arpa/inet.h fcntl.h netdb.h netinet/in.h sys/ioctl.h sys/mount.h sys/socket.h syslog.h])
92 AC_SUBST(sbin_PROGRAMS)
93 AM_CONFIG_HEADER(config.h)
94 AC_CONFIG_FILES([Makefile])