Added Gnulib intprops module.
[portablexdr.git] / configure.ac
1 dnl PortableXDR - a free, portable XDR implementation.
2 dnl Copyright (C) 2008-2009 Red Hat Inc.
3 dnl
4 dnl This program is free software; you can redistribute it and/or modify
5 dnl it under the terms of the GNU General Public License as published by
6 dnl the Free Software Foundation; either version 2 of the License, or
7 dnl (at your option) any later version.
8 dnl
9 dnl This program is distributed in the hope that it will be useful,
10 dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
11 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12 dnl GNU General Public License for more details.
13 dnl
14 dnl You should have received a copy of the GNU General Public License
15 dnl along with this program; if not, write to the Free Software
16 dnl Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
17
18 AC_INIT(portablexdr, 4.9.2)
19 AM_INIT_AUTOMAKE
20
21 AC_CONFIG_HEADERS([config.h])
22 AC_CONFIG_MACRO_DIR([m4])
23
24 AC_CANONICAL_HOST
25 AC_PROG_CC
26 gl_EARLY
27
28 AM_PROG_CC_C_O
29
30 AC_PROG_INSTALL
31 AC_PROG_LIBTOOL
32
33 AC_PROG_LEX
34 AC_PROG_YACC
35
36 gl_INIT
37
38 AC_TYPE_SIZE_T
39 AC_TYPE_SSIZE_T
40 AC_TYPE_OFF_T
41
42 AC_CHECK_PROGS(AR, ar)
43
44 dnl Look for an external 'cpp' program which can run on a file with any
45 dnl extension.  The normal CPP can only run on files with a '.c'
46 dnl extension, therefore we prefer to use /usr/bin/cpp if it exists.
47 AC_PATH_PROG([EXTCPP], [cpp], [no])
48 if test "x$EXTCPP" = "xno"; then
49   AC_MSG_FAILURE([Cannot find a working 'cpp' (C preprocessor) program])
50 fi
51 AC_DEFINE_UNQUOTED([EXTCPP], ["$EXTCPP"],
52         [The C preprocessor command (may include command line options).])
53
54 MINGW_EXTRA_LDFLAGS=
55 case "$host" in
56  *-*-mingw*)
57    MINGW_EXTRA_LDFLAGS="-no-undefined"
58    ;;
59 esac
60 AC_SUBST(MINGW_EXTRA_LDFLAGS)
61
62 AC_CHECK_HEADERS([arpa/inet.h sys/param.h])
63 AC_CHECK_FUNCS([ntohl htonl ntohs htons])
64
65 AC_CONFIG_FILES([Makefile lib/Makefile])
66 AC_OUTPUT