docs: Update documentation for spapr-vio addresses
[libvirt/ericb.git] / m4 / virt-external-programs.m4
blob0f995998c3b64d8e9dfa78b6fd118c46a3195ad5
1 dnl The External programs check
2 dnl
3 dnl Copyright (C) 2016 Red Hat, Inc.
4 dnl
5 dnl This library is free software; you can redistribute it and/or
6 dnl modify it under the terms of the GNU Lesser General Public
7 dnl License as published by the Free Software Foundation; either
8 dnl version 2.1 of the License, or (at your option) any later version.
9 dnl
10 dnl This library is distributed in the hope that it will be useful,
11 dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
12 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13 dnl Lesser General Public License for more details.
14 dnl
15 dnl You should have received a copy of the GNU Lesser General Public
16 dnl License along with this library.  If not, see
17 dnl <http://www.gnu.org/licenses/>.
18 dnl
20 AC_DEFUN([LIBVIRT_CHECK_EXTERNAL_PROGRAMS], [
21   dnl Do we have rpcgen?
22   AC_PATH_PROGS([RPCGEN], [rpcgen portable-rpcgen], [no])
23   AM_CONDITIONAL([HAVE_RPCGEN], [test "x$ac_cv_path_RPCGEN" != "xno"])
25   dnl Miscellaneous external programs.
26   AC_PATH_PROG([XMLLINT], [xmllint], [])
27   if test -z "$XMLLINT"
28   then
29     AC_MSG_ERROR("xmllint is required to build libvirt")
30   fi
31   AC_PATH_PROG([XSLTPROC], [xsltproc], [])
32   if test -z "$XSLTPROC"
33   then
34     AC_MSG_ERROR("xsltproc is required to build libvirt")
35   fi
36   AC_PATH_PROG([AUGPARSE], [augparse], [/usr/bin/augparse])
37   AC_PROG_MKDIR_P
38   AC_PROG_LN_S
40   dnl External programs that we can use if they are available.
41   dnl We will hard-code paths to these programs unless we cannot
42   dnl detect them, in which case we'll search for the program
43   dnl along the $PATH at runtime and fail if it's not there.
44   AC_PATH_PROG([DMIDECODE], [dmidecode], [dmidecode], [$LIBVIRT_SBIN_PATH])
45   AC_PATH_PROG([DNSMASQ], [dnsmasq], [dnsmasq], [$LIBVIRT_SBIN_PATH])
46   AC_PATH_PROG([RADVD], [radvd], [radvd], [$LIBVIRT_SBIN_PATH])
47   AC_PATH_PROG([TC], [tc], [tc], [$LIBVIRT_SBIN_PATH])
48   AC_PATH_PROG([UDEVADM], [udevadm], [udevadm], [$LIBVIRT_SBIN_PATH])
49   AC_PATH_PROG([MODPROBE], [modprobe], [modprobe], [$LIBVIRT_SBIN_PATH])
50   AC_PATH_PROG([RMMOD], [rmmod], [rmmod], [$LIBVIRT_SBIN_PATH])
51   AC_PATH_PROG([MMCTL], [mm-ctl], [mm-ctl], [$LIBVIRT_SBIN_PATH])
52   AC_PATH_PROG([OVSVSCTL], [ovs-vsctl], [ovs-vsctl], [$LIBVIRT_SBIN_PATH])
53   AC_PATH_PROG([SCRUB], [scrub], [scrub], [$LIBVIRT_SBIN_PATH])
54   AC_PATH_PROG([ADDR2LINE], [addr2line], [addr2line], [$LIBVIRT_SBIN_PATH])
56   AC_DEFINE_UNQUOTED([DMIDECODE], ["$DMIDECODE"],
57                      [Location or name of the dmidecode program])
58   AC_DEFINE_UNQUOTED([DNSMASQ], ["$DNSMASQ"],
59                      [Location or name of the dnsmasq program])
60   AC_DEFINE_UNQUOTED([RADVD], ["$RADVD"],
61                      [Location or name of the radvd program])
62   AC_DEFINE_UNQUOTED([TC], ["$TC"],
63                      [Location or name of the tc program (see iproute2)])
64   AC_DEFINE_UNQUOTED([MMCTL], ["$MMCTL"],
65                      [Location or name of the mm-ctl program])
66   AC_DEFINE_UNQUOTED([OVSVSCTL], ["$OVSVSCTL"],
67                      [Location or name of the ovs-vsctl program])
68   AC_DEFINE_UNQUOTED([UDEVADM], ["$UDEVADM"],
69                      [Location or name of the udevadm program])
70   AC_DEFINE_UNQUOTED([MODPROBE], ["$MODPROBE"],
71                      [Location or name of the modprobe program])
72   AC_DEFINE_UNQUOTED([RMMOD], ["$RMMOD"],
73                      [Location or name of the rmmod program])
74   AC_DEFINE_UNQUOTED([SCRUB], ["$SCRUB"],
75                      [Location or name of the scrub program (for wiping algorithms)])
76   AC_DEFINE_UNQUOTED([ADDR2LINE], ["$ADDR2LINE"],
77                      [Location of addr2line program])
79   AC_PATH_PROG([IP_PATH], [ip], [/sbin/ip], [$LIBVIRT_SBIN_PATH])
80   AC_DEFINE_UNQUOTED([IP_PATH], ["$IP_PATH"], [path to ip binary])
82   AC_PATH_PROG([IPTABLES_PATH], [iptables], /sbin/iptables, [$LIBVIRT_SBIN_PATH])
83   AC_DEFINE_UNQUOTED([IPTABLES_PATH], ["$IPTABLES_PATH"], [path to iptables binary])
85   AC_PATH_PROG([IP6TABLES_PATH], [ip6tables], [/sbin/ip6tables], [$LIBVIRT_SBIN_PATH])
86   AC_DEFINE_UNQUOTED([IP6TABLES_PATH], ["$IP6TABLES_PATH"], [path to ip6tables binary])
88   AC_PATH_PROG([EBTABLES_PATH], [ebtables], [/sbin/ebtables], [$LIBVIRT_SBIN_PATH])
89   AC_DEFINE_UNQUOTED([EBTABLES_PATH], ["$EBTABLES_PATH"], [path to ebtables binary])