-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure.ac
106 lines (86 loc) · 3.12 KB
/
configure.ac
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
# libguestfs
# Copyright (C) 2009-2019 Red Hat Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
AC_INIT([libguestfs-analysis-tools], [1.41.8])
AC_CONFIG_AUX_DIR([build-aux])
AC_USE_SYSTEM_EXTENSIONS
dnl Initialize automake.
AM_INIT_AUTOMAKE(foreign subdir-objects tar-pax) dnl NB: Do not [quote] this parameter.
AC_CONFIG_MACRO_DIR([m4])
dnl Initialize libtool.
LT_INIT
dnl The C compiler environment.
dnl Define the host CPU architecture (defines 'host_cpu')
AC_CANONICAL_HOST
AC_DEFINE_UNQUOTED([host_cpu],["$host_cpu"],[Host architecture.])
dnl Check for basic C environment.
AC_PROG_CC_STDC
AC_PROG_INSTALL
AC_PROG_CPP
AC_C_PROTOTYPES
test "x$U" != "x" && AC_MSG_ERROR([Compiler not ANSI compliant])
AM_PROG_CC_C_O
AC_SUBST([WARN_CFLAGS], [-Wall])
dnl XXX Implement WERROR_CFLAGS
dnl Check support for 64 bit file offsets.
AC_SYS_LARGEFILE
dnl Check for gettext.
AM_GNU_GETTEXT([external])
dnl Check for libguestfs.
PKG_CHECK_MODULES([LIBGUESTFS], [libguestfs >= 1.40])
dnl Check for PCRE.
PKG_CHECK_MODULES([PCRE], [libpcre], [], [
AC_CHECK_PROGS([PCRE_CONFIG], [pcre-config pcre2-config], [no])
AS_IF([test "x$PCRE_CONFIG" = "xno"], [
AC_MSG_ERROR([Please install the pcre devel package])
])
PCRE_CFLAGS=`$PCRE_CONFIG --cflags`
PCRE_LIBS=`$PCRE_CONFIG --libs`
])
dnl Check for perl (required).
AC_CHECK_PROG([PERL],[perl],[perl],[no])
test "x$PERL" = "xno" &&
AC_MSG_ERROR([perl must be installed])
dnl Check for Pod::Man, Pod::Simple (for man pages).
AC_MSG_CHECKING([for Pod::Man])
if ! $PERL -MPod::Man -e1 >&AS_MESSAGE_LOG_FD 2>&1; then
AC_MSG_ERROR([perl Pod::Man must be installed])
else
AC_MSG_RESULT([yes])
fi
AC_MSG_CHECKING([for Pod::Simple])
if ! $PERL -MPod::Simple -e1 >&AS_MESSAGE_LOG_FD 2>&1; then
AC_MSG_ERROR([perl Pod::Simple must be installed])
else
AC_MSG_RESULT([yes])
fi
dnl Define a macro referring to podwrapper.pl.
PODWRAPPER="$PERL $(pwd)/podwrapper.pl"
AC_SUBST([PODWRAPPER])
dnl Only build boot-analysis program on x86-64 and aarch64. It
dnl requires custom work to port to each architecture.
AM_CONDITIONAL([HAVE_BOOT_ANALYSIS],
[test "$host_cpu" = "x86_64" || test "$host_cpu" = "aarch64"])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_FILES([Makefile
boot-analysis/Makefile
boot-benchmark/Makefile
max-disks/Makefile
podwrapper.pl
qemu-boot/Makefile
qemu-speed-test/Makefile
utils/Makefile])
AC_OUTPUT