New header files with most of the inline functions required.
[portablexdr.git] / configure.ac
1 AC_INIT(portablexdr, 4.9.2)
2 AM_INIT_AUTOMAKE
3
4 AC_CONFIG_HEADERS([config.h])
5
6 AC_CONFIG_MACRO_DIR([m4])
7
8 AC_CANONICAL_HOST
9 AC_PROG_CC
10 AM_PROG_CC_C_O
11
12 AC_PROG_INSTALL
13 AC_PROG_LIBTOOL
14
15 AC_PROG_LEX
16 AC_PROG_YACC
17
18 AC_TYPE_SIZE_T
19 AC_TYPE_SSIZE_T
20 AC_TYPE_OFF_T
21
22 AC_CHECK_PROGS(AR, ar)
23
24 dnl Look for an external 'cpp' program which can run on a file with any
25 dnl extension.  The normal CPP can only run on files with a '.c'
26 dnl extension, therefore we prefer to use /usr/bin/cpp if it exists.
27 AC_PATH_PROG([EXTCPP], [cpp], [no])
28 if test "x$EXTCPP" = "xno"; then
29   AC_MSG_FAILURE([Cannot find a working 'cpp' (C preprocessor) program])
30 fi
31 AC_DEFINE_UNQUOTED([EXTCPP], ["$EXTCPP"],
32         [The C preprocessor command (may include command line options).])
33
34 MINGW_EXTRA_LDFLAGS=
35 case "$host" in
36  *-*-mingw*)
37    MINGW_EXTRA_LDFLAGS="-no-undefined"
38    ;;
39 esac
40 AC_SUBST(MINGW_EXTRA_LDFLAGS)
41
42 AC_CHECK_HEADERS([arpa/inet.h sys/param.h])
43 AC_CHECK_FUNCS([ntohl htonl ntohs htons])
44
45 AC_OUTPUT(Makefile)
46