r64: Add missing closing bracket
[nbd.git] / configure.ac
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],[wouter@debian.org])
5 AM_INIT_AUTOMAKE(nbd, 2.7)
6
7 AC_ARG_ENABLE(lfs, AC_HELP_STRING([--enable-lfs],[Enable Large File Support]), [NBD_LFS=1], [NBD_LFS=0])
8 AC_MSG_CHECKING([whether Large File Support should be enabled])
9 if test $NBD_LFS -eq 1; then
10   AC_DEFINE(NBD_LFS,1, [Define to 1 if Large File Support should be enabled])
11   AC_MSG_RESULT([yes])
12 else
13   AC_DEFINE(NBD_LFS,0)
14   AC_MSG_RESULT([no])
15 fi
16
17 AC_ARG_ENABLE(syslog, AC_HELP_STRING([--enable-syslog],[Enable Syslog logging]), [ISSERVER=1], [ISSERVER=0])
18 AC_MSG_CHECKING([whether syslog logging is requested])
19 if test $ISSERVER -eq 1; then
20   AC_DEFINE(ISSERVER,1, [Define to 1 if you want nbd-server to log through syslog])
21   AC_MSG_RESULT([yes])
22 else
23   AC_MSG_RESULT([no])
24 fi
25 AC_PROG_CC
26 AC_MSG_CHECKING(whether warnings should be enabled)
27 if test -n "$GCC" ; then
28   AC_MSG_RESULT(yes)
29   #CFLAGS="$CFLAGS -Wall -W -Wno-parentheses -Wstrict-prototypes -Wno-unused"
30 else
31   AC_MSG_RESULT(no)
32 fi
33 #AC_PROG_INSTALL
34 AC_C_BIGENDIAN
35 AC_C_INLINE
36 AC_C_CONST
37 AC_CHECK_SIZEOF(unsigned short int)
38 AC_CHECK_SIZEOF(unsigned int)
39 AC_CHECK_SIZEOF(unsigned long int)
40 AC_CHECK_SIZEOF(unsigned long long int)
41 AC_CHECK_FUNCS([llseek alarm gethostbyname inet_ntoa memset socket strerror strstr])
42 AC_FUNC_FORK
43 AC_FUNC_SETVBUF_REVERSED
44 AC_MSG_CHECKING(whether client should be built)
45 case "`uname`" in
46      *Linux*) sbin_PROGRAMS=nbd-client
47               AC_MSG_RESULT(yes)
48               ;;
49      *) AC_MSG_RESULT(no) ;;
50 esac
51 AC_MSG_CHECKING(whether there is a local nbd.h)
52 if test -f nbd.h; then
53   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)])
54   AC_MSG_RESULT(yes)
55 else
56   AC_MSG_RESULT(no)
57 fi
58 AC_CHECK_HEADERS([linux/nbd.h],,,
59 [[#define u32 unsigned int
60 #define u64 unsigned long int
61 ]])
62 AC_CHECK_HEADERS([arpa/inet.h fcntl.h netdb.h netinet/in.h sys/ioctl.h sys/mount.h sys/socket.h syslog.h])
63 AC_HEADER_SYS_WAIT
64 AC_TYPE_OFF_T
65 AC_TYPE_PID_T
66 AC_SUBST(sbin_PROGRAMS)
67 AM_CONFIG_HEADER(config.h)
68 AC_CONFIG_FILES([Makefile])
69 AC_OUTPUT
70