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