r38: configure.in:
[nbd.git] / configure.in
1 dnl Configure script for NBD system
2 dnl (c) 1998 Martin Mares <mj@ucw.cz>, (c) 2000 Pavel Machek <pavel@ucw.cz>
3 AC_INIT(nbd, 2.5, wouter@debian.org)
4 AC_ARG_ENABLE(lfs, AC_HELP_STRING([--enable-lfs],[Enable Large File Support (default is no)]), [NBD_LFS=1], [NBD_LFS=0])
5 AC_MSG_CHECKING([whether Large File Support should be enabled])
6 if test $NBD_LFS -eq 1; then
7   AC_DEFINE(NBD_LFS,1, [Define to 1 if Large File Support should be enabled])
8   AC_MSG_RESULT([yes])
9 else
10   AC_DEFINE(NBD_LFS,0)
11   AC_MSG_RESULT([no])
12 fi
13 AC_PROG_CC
14 AC_MSG_CHECKING(whether warnings should be enabled)
15 if test -n "$GCC" ; then
16   AC_MSG_RESULT(yes)
17   CFLAGS="$CFLAGS -Wall -W -Wno-parentheses -Wstrict-prototypes -Wno-unused"
18 else
19   AC_MSG_RESULT(no)
20 fi
21 #AC_PROG_INSTALL
22 AC_C_BIGENDIAN
23 AC_C_INLINE
24 AC_C_CONST
25 AC_CHECK_SIZEOF(unsigned short int)
26 AC_CHECK_SIZEOF(unsigned int)
27 AC_CHECK_SIZEOF(unsigned long int)
28 AC_CHECK_SIZEOF(unsigned long long int)
29 AC_CHECK_FUNCS([llseek alarm gethostbyname inet_ntoa memset socket strerror strstr])
30 AC_FUNC_FORK
31 AC_FUNC_MALLOC
32 AC_FUNC_REALLOC
33 AC_FUNC_SETVBUF_REVERSED
34 AC_MSG_CHECKING(whether client should be built)
35 case "`uname`" in
36      *Linux*) BUILD_CLIENT=nbd-client
37               AC_MSG_RESULT(yes)
38               ;;
39      *) AC_MSG_RESULT(no) ;;
40      esac
41 AC_CHECK_HEADERS([linux/nbd.h arpa/inet.h fcntl.h netdb.h netinet/in.h sys/ioctl.h sys/mount.h sys/socket.h syslog.h])
42 AC_HEADER_SYS_WAIT
43 AC_TYPE_OFF_T
44 AC_TYPE_PID_T
45 AC_SUBST(BUILD_CLIENT)
46 AC_CONFIG_HEADER(config.h)
47 AC_OUTPUT(Makefile)
48