Small fix to documentation.
[miniexpect.git] / configure.ac
1 # miniexpect
2 # Copyright (C) 2014 Red Hat Inc.
3 #
4 # This library is free software; you can redistribute it and/or
5 # modify it under the terms of the GNU Lesser General Public
6 # License as published by the Free Software Foundation; either
7 # version 2 of the License, or (at your option) any later version.
8 #
9 # This library is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12 # Lesser General Public License for more details.
13 #
14 # You should have received a copy of the GNU Lesser General Public
15 # License along with this library; if not, write to the Free Software
16 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17
18 AC_INIT([miniexpect],[1.0])
19
20 AM_INIT_AUTOMAKE(foreign) dnl NB: Do not [quote] this parameter.
21
22 m4_ifndef([AM_SILENT_RULES], [m4_define([AM_SILENT_RULES],[])])
23 AM_SILENT_RULES([yes]) # make --enable-silent-rules the default.
24
25 AC_CONFIG_MACRO_DIR([m4])
26
27 dnl Enable system extensions (_GNU_SOURCE etc).
28 AC_USE_SYSTEM_EXTENSIONS
29
30 AM_PROG_LIBTOOL
31
32 dnl Check for basic C environment.
33 AC_PROG_CC_STDC
34 AC_PROG_INSTALL
35 AC_PROG_CPP
36
37 AC_C_PROTOTYPES
38 test "x$U" != "x" && AC_MSG_ERROR([Compiler not ANSI compliant])
39
40 AM_PROG_CC_C_O
41
42 dnl Check support for 64 bit file offsets.
43 AC_SYS_LARGEFILE
44
45 dnl The only dependency is libpcre (Perl Compatible Regular Expressions).
46 PKG_CHECK_MODULES([PCRE], [libpcre])
47
48 dnl Optional for building the manual page.  This is part of Perl.
49 AC_CHECK_PROG([POD2MAN], [pod2man], [pod2man], [no])
50 AM_CONDITIONAL([HAVE_POD2MAN], [test "x$POD2MAN" != "xno"])
51
52 dnl Optional for checking for memory errors.
53 AC_CHECK_PROG([VALGRIND], [valgrind], [valgrind], [no])
54 AS_IF([test "x$VALGRIND" != "xno"],[
55     VG='$(VALGRIND) --leak-check=full --show-leak-kinds=all --error-exitcode=119 --trace-children=no'
56 ],[
57     dnl Valgrind is not installed, so give a clear error if
58     dnl the user tries 'make check-valgrind'.
59     VG=ERROR_VALGRIND_IS_NOT_INSTALLED
60 ])
61 AC_SUBST([VG])
62
63 dnl Produce output files.
64 AC_CONFIG_HEADERS([config.h])
65
66 AC_CONFIG_FILES([Makefile])
67 AC_OUTPUT