2 # Copyright (C) 2013 Red Hat Inc.
4 # This program is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
6 # the Free Software Foundation; either version 2 of the License, or
7 # (at your option) any later version.
9 # This program 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
12 # GNU General Public License for more details.
14 # You should have received a copy of the GNU General Public License along
15 # with this program; if not, write to the Free Software Foundation, Inc.,
16 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18 AC_INIT([qemu-sanity-check],[1.1.1])
19 AM_INIT_AUTOMAKE([foreign])
21 dnl Only used temporarily while the spec file is contained in the
22 dnl tarball. We will remove this later.
23 AC_SUBST([RPM_RELEASE],[1])
25 dnl Check for basic C environment.
31 test "x$U" != "x" && AC_MSG_ERROR([Compiler not ANSI compliant])
37 AC_MSG_CHECKING([that a static binary can be built])
39 old_LDFLAGS="$LDFLAGS"
40 CFLAGS="$CFLAGS -static"
41 LDFLAGS="$LDFLAGS -static"
45 int main () { exit (0); }
50 AC_MSG_ERROR([Building a static binary failed. Make sure you have static libc installed.])
53 AC_CHECK_PROG([POD2MAN], [pod2man], [pod2man], [no])
54 if test "x$POD2MAN" = "xno"; then
55 AC_MSG_WARN([pod2man was not found. This is needed to build man pages.])
57 AM_CONDITIONAL([HAVE_POD2MAN], [test "x$POD2MAN" != "xno"])
59 dnl Produce output files.
60 AC_CONFIG_HEADERS([config.h])
61 AC_CONFIG_FILES([qemu-sanity-check],[chmod 0555 qemu-sanity-check])
62 AC_CONFIG_FILES([Makefile
63 qemu-sanity-check.spec])