+Thu Sep 20 19:37:00 BST 2007 Richard W.M. Jones <rjones@redhat.com>
+
+ * src/bridge.c, src/qemu_driver.c, configure.in: Try to detect
+ the paths of dnsmasq and brctl at compile time. If found
+ then compile them in, otherwise search $PATH at runtime.
+
+ * libvirt.spec.in: BR dnsmasq and bridge-utils so we have their
+ paths at compile time.
+
Thu Sep 20 18:10:00 BST 2007 Richard W.M. Jones <rjones@redhat.com>
* src/qemu_driver.c, docs/libvir.html: Support virConnectGetHostname
AC_PATH_PROG(XMLLINT, xmllint, /usr/bin/xmllint)
AC_PATH_PROG(XSLTPROC, xsltproc, /usr/bin/xsltproc)
+dnl External programs that we can use if they are available.
+dnl We will hard-code paths to these programs unless we cannot
+dnl detect them, in which case we'll search for the program
+dnl along the $PATH at runtime and fail if it's not there.
+AC_PATH_PROG(DNSMASQ, dnsmasq, dnsmasq,
+ [/sbin:/usr/sbin:/usr/local/sbin:$PATH])
+AC_PATH_PROG(BRCTL, brctl, brctl,
+ [/sbin:/usr/sbin:/usr/local/sbin:$PATH])
+
+AC_DEFINE_UNQUOTED([DNSMASQ],["$DNSMASQ"],
+ [Location or name of the dnsmasq program])
+AC_DEFINE_UNQUOTED([BRCTL],["$BRCTL"],
+ [Location or name of the brctl program (see bridge-utils)])
+
dnl Make sure we have an ANSI compiler
AM_C_PROTOTYPES
test "x$U" != "x" && AC_MSG_ERROR(Compiler not ANSI compliant)
BuildRequires: gettext
BuildRequires: gnutls-devel
BuildRequires: avahi-devel
+BuildRequires: dnsmasq
+BuildRequires: bridge-utils
Obsoletes: libvir
ExclusiveArch: i386 x86_64 ia64
#define MAX_BRIDGE_ID 256
-#define BRCTL_PATH "/usr/sbin/brctl"
#define JIFFIES_TO_MS(j) (((j)*1000)/HZ)
#define MS_TO_JIFFIES(ms) (((ms)*HZ)/1000)
n = 0;
- if (!(argv[n++] = strdup(BRCTL_PATH)))
+ if (!(argv[n++] = strdup(BRCTL)))
goto error;
if (!(argv[n++] = strdup("setfd")))
n = 0;
- if (!(argv[n++] = strdup(BRCTL_PATH)))
+ if (!(argv[n++] = strdup(BRCTL)))
goto error;
if (!(argv[n++] = strdup("stp")))
i = 0;
- APPEND_ARG(*argv, i++, "dnsmasq");
+ APPEND_ARG(*argv, i++, DNSMASQ);
APPEND_ARG(*argv, i++, "--keep-in-foreground");
/*