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.99pre2.8],[wouter@debian.org])
9 AS_HELP_STRING(--enable-lfs,Enable Large File Support),
11 if test "x$enableval" = "xyes" ; then
19 AC_MSG_CHECKING([whether Large File Support should be enabled])
20 if test $NBD_LFS -eq 1; then
21 AC_DEFINE(NBD_LFS,1, [Define to 1 if Large File Support should be enabled])
30 AS_HELP_STRING(--enable-syslog,Enable Syslog logging),
32 if test "x$enableval" = "xyes" ; then
40 AC_MSG_CHECKING([whether syslog logging is requested])
41 if test $ISSERVER -eq 1; then
42 AC_DEFINE(ISSERVER,1, [Define to 1 if you want nbd-server to log through syslog])
49 AC_MSG_CHECKING(whether warnings should be enabled)
50 if test -n "$GCC" ; then
52 #CFLAGS="$CFLAGS -Wall -W -Wno-parentheses -Wstrict-prototypes -Wno-unused"
60 AC_CHECK_SIZEOF(unsigned short int)
61 AC_CHECK_SIZEOF(unsigned int)
62 AC_CHECK_SIZEOF(unsigned long int)
63 AC_CHECK_SIZEOF(unsigned long long int)
64 AC_CHECK_FUNCS([llseek alarm gethostbyname inet_ntoa memset socket strerror strstr])
66 AC_FUNC_SETVBUF_REVERSED
67 AC_MSG_CHECKING(whether client should be built)
69 *Linux*) sbin_PROGRAMS=nbd-client
72 *) AC_MSG_RESULT(no) ;;
74 AC_MSG_CHECKING(whether there is a local nbd.h)
75 if test -f nbd.h; then
76 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)])
81 AC_CHECK_HEADERS([linux/nbd.h],,,
82 [[#define u32 unsigned int
83 #define u64 unsigned long int
85 AC_CHECK_HEADERS([arpa/inet.h fcntl.h netdb.h netinet/in.h sys/ioctl.h sys/mount.h sys/socket.h syslog.h])
86 AM_PATH_GLIB_2_0(2.2.3, [HAVE_GLIB=yes], AC_MSG_ERROR([Missing glib]))
90 AC_SUBST(sbin_PROGRAMS)
91 AC_CONFIG_HEADERS([config.h])
92 AC_CONFIG_FILES([Makefile])