Sync usage with man page.
[netbsd-mini2440.git] / external / bsd / iscsi / dist / configure.ac
blob2cbd184c6ea77d8d26e3147b00c5ca3ec158c8b7
1 dnl Process this file with autoconf to produce a configure script.
2 AC_PREREQ(2.57)
3 AC_INIT([netbsd-iscsi],[20090622],[Alistair Crooks <agc@NetBSD.org>])
5 AC_CONFIG_SRCDIR([src/lib/protocol.c])
6 AC_CONFIG_AUX_DIR([buildaux])
7 AC_CONFIG_HEADER(include/config.h)
9 AS_SHELL_SANITIZE
11 AM_INIT_AUTOMAKE([-Wall -Werror foreign])
12 AM_MAINTAINER_MODE
14 AC_CANONICAL_HOST
15 CANONICAL_HOST=$host
16 AC_SUBST([CANONICAL_HOST])
18 dnl Checks for programs.
19 AC_PROG_INSTALL
20 AC_PROG_CC
21 AC_PROG_RANLIB
22 AC_PROG_LIBTOOL
24 dnl Checks for header files.
25 AC_HEADER_STDC
26 AC_CHECK_HEADERS(sys/types.h sys/param.h sys/stat.h sys/time.h)
27 AC_CHECK_HEADERS(sys/mman.h sys/uio.h sys/socket.h sys/time.h sys/vfs.h)
28 AC_CHECK_HEADERS(arpa/inet.h netinet/in.h netinet/tcp.h netdb.h poll.h)
29 AC_CHECK_HEADERS(asm/byteorder.h sys/bswap.h sys/byteorder.h sys/select.h)
30 AC_CHECK_HEADERS(libkern/OSByteOrder.h byteswap.h machine/endian.h)
31 AC_CHECK_HEADERS(ctype.h errno.h fcntl.h pthread.h pwd.h signal.h stdint.h)
32 AC_CHECK_HEADERS(stdlib.h syslog.h unistd.h string.h stdarg.h utime.h uuid.h)
34 dnl Checks for typedefs, structures, and compiler characteristics.
35 AC_C_CONST
36 AC_TYPE_SIZE_T
37 AC_CHECK_TYPES(socklen_t,,,[
38 #include <sys/socket.h>
39 #include <arpa/inet.h>
41 AC_CHECK_TYPES([long long, unsigned long long])
42 AC_DEFINE_UNQUOTED(HAVE_SOCKLEN_T, $ac_cv_type_socklen_t)
43 AC_DEFINE_UNQUOTED(HAVE_LONG_LONG, $ac_cv_type_long_long)
44 AC_DEFINE_UNQUOTED(HAVE_UNSIGNED_LONG_LONG, $ac_cv_type_unsigned_long_long)
46 # Checks for typedefs, structures, and compiler characteristics.
48 AC_TYPE_UNSIGNED_LONG_LONG_INT
49 AC_TYPE_LONG_LONG_INT
50 AC_TYPE_SIZE_T
51 AC_TYPE_UINT16_T
52 AC_TYPE_UINT32_T
53 AC_TYPE_UINT64_T
54 AC_TYPE_UINT8_T
56 dnl check for libraries
57 AC_SEARCH_LIBS([gethostbyname], [nsl])
58 AC_SEARCH_LIBS([connect], [socket])
59 AC_SEARCH_LIBS([inet_aton], [resolv])
60 AC_SEARCH_LIBS([pthread_create], [pthread])
62 dnl Check for functionality
63 AC_CHECK_FUNCS(__bswap64 asprintf asnprintf bswap64 daemon fsync_range)
64 AC_CHECK_FUNCS(getaddrinfo getnameinfo htobe64 memset bcopy poll snprintf)
65 AC_CHECK_FUNCS(strlcpy strtoll syslog uuid_create uuid_to_string vasprintf)
66 AC_CHECK_FUNCS(vasprintf vasnprintf vsnprintf)
68 dnl that's it for now...
69 AC_OUTPUT(Makefile)
70 AC_OUTPUT(src/Makefile)
71 AC_OUTPUT(src/lib/Makefile)
72 AC_OUTPUT(src/target/Makefile)
73 AC_OUTPUT(src/initiator/Makefile)