2 # Copyright (C) 2014-2022 Red Hat Inc.
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.
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.
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
18 AC_INIT([miniexpect],[1.1])
20 AM_INIT_AUTOMAKE(foreign) dnl NB: Do not [quote] this parameter.
22 m4_ifndef([AM_SILENT_RULES], [m4_define([AM_SILENT_RULES],[])])
23 AM_SILENT_RULES([yes]) # make --enable-silent-rules the default.
25 AC_CONFIG_MACRO_DIR([m4])
27 dnl Enable system extensions (_GNU_SOURCE etc).
28 AC_USE_SYSTEM_EXTENSIONS
32 dnl Check for basic C environment.
38 test "x$U" != "x" && AC_MSG_ERROR([Compiler not ANSI compliant])
42 dnl Check support for 64 bit file offsets.
45 dnl The only dependency is libpcre2 (Perl Compatible Regular Expressions).
46 PKG_CHECK_MODULES([PCRE2], [libpcre2-8])
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"])
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'
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
63 dnl Produce output files.
64 AC_CONFIG_HEADERS([config.h])
66 AC_CONFIG_FILES([Makefile])