3 dnl Copyright (C) 2014 Roman Bogorodskiy
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.
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.
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/>.
20 AC_DEFUN([LIBVIRT_DRIVER_ARG_BHYVE],[
21 LIBVIRT_ARG_WITH_FEATURE([BHYVE], [BHyVe], [check])
24 AC_DEFUN([LIBVIRT_DRIVER_CHECK_BHYVE],[
25 if test "$with_bhyve" != "no"; then
26 AC_PATH_PROG([BHYVE], [bhyve], [], [$PATH:/usr/sbin])
27 AC_PATH_PROG([BHYVECTL], [bhyvectl], [], [$PATH:/usr/sbin])
28 AC_PATH_PROG([BHYVELOAD], [bhyveload], [], [$PATH:/usr/sbin/])
30 if test -z "$BHYVE" || test -z "$BHYVECTL" || \
31 test -z "$BHYVELOAD" || test "$with_freebsd" = "no"; then
32 if test "$with_bhyve" = "check"; then
35 AC_MSG_ERROR([The bhyve driver cannot be enabled])
42 if test "$with_bhyve" = "yes"; then
43 AC_DEFINE_UNQUOTED([WITH_BHYVE], 1, [whether bhyve driver is enabled])
44 AC_DEFINE_UNQUOTED([BHYVE], ["$BHYVE"],
45 [Location of the bhyve tool])
46 AC_DEFINE_UNQUOTED([BHYVECTL], ["$BHYVECTL"],
47 [Location of the bhyvectl tool])
48 AC_DEFINE_UNQUOTED([BHYVELOAD], ["$BHYVELOAD"],
49 [Location of the bhyveload tool])
51 AM_CONDITIONAL([WITH_BHYVE], [test "$with_bhyve" = "yes"])
54 dnl Build with gnulib's getopt which contains a reentrant interface
55 AC_DEFUN([gl_REPLACE_GETOPT_ALWAYS], [])
57 AC_DEFUN([LIBVIRT_DRIVER_RESULT_BHYVE],[
58 LIBVIRT_RESULT([Bhyve], [$with_bhyve])