2014-02-18 10:08:10 +00:00
|
|
|
dnl The bhyve driver
|
|
|
|
dnl
|
|
|
|
dnl Copyright (C) 2014 Roman Bogorodskiy
|
|
|
|
dnl
|
|
|
|
dnl This library is free software; you can redistribute it and/or
|
|
|
|
dnl modify it under the terms of the GNU Lesser General Public
|
|
|
|
dnl License as published by the Free Software Foundation; either
|
|
|
|
dnl version 2.1 of the License, or (at your option) any later version.
|
|
|
|
dnl
|
|
|
|
dnl This library is distributed in the hope that it will be useful,
|
|
|
|
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
dnl Lesser General Public License for more details.
|
|
|
|
dnl
|
|
|
|
dnl You should have received a copy of the GNU Lesser General Public
|
|
|
|
dnl License along with this library. If not, see
|
|
|
|
dnl <http://www.gnu.org/licenses/>.
|
|
|
|
dnl
|
|
|
|
|
2016-12-12 17:11:51 +00:00
|
|
|
AC_DEFUN([LIBVIRT_DRIVER_ARG_BHYVE],[
|
2016-12-22 11:49:51 +00:00
|
|
|
LIBVIRT_ARG_WITH_FEATURE([BHYVE], [BHyVe], [check])
|
2016-12-12 17:11:51 +00:00
|
|
|
])
|
2014-02-18 10:08:10 +00:00
|
|
|
|
2016-12-12 17:11:51 +00:00
|
|
|
AC_DEFUN([LIBVIRT_DRIVER_CHECK_BHYVE],[
|
2014-02-18 10:08:10 +00:00
|
|
|
if test "$with_bhyve" != "no"; then
|
|
|
|
AC_PATH_PROG([BHYVE], [bhyve], [], [$PATH:/usr/sbin])
|
|
|
|
AC_PATH_PROG([BHYVECTL], [bhyvectl], [], [$PATH:/usr/sbin])
|
|
|
|
AC_PATH_PROG([BHYVELOAD], [bhyveload], [], [$PATH:/usr/sbin/])
|
|
|
|
|
2014-06-06 15:25:11 +00:00
|
|
|
if test -z "$BHYVE" || test -z "$BHYVECTL" || \
|
2014-02-18 10:08:10 +00:00
|
|
|
test -z "$BHYVELOAD" || test "$with_freebsd" = "no"; then
|
|
|
|
if test "$with_bhyve" = "check"; then
|
|
|
|
with_bhyve="no"
|
|
|
|
else
|
|
|
|
AC_MSG_ERROR([The bhyve driver cannot be enabled])
|
|
|
|
fi
|
|
|
|
else
|
|
|
|
with_bhyve="yes"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test "$with_bhyve" = "yes"; then
|
|
|
|
AC_DEFINE_UNQUOTED([WITH_BHYVE], 1, [whether bhyve driver is enabled])
|
|
|
|
AC_DEFINE_UNQUOTED([BHYVE], ["$BHYVE"],
|
|
|
|
[Location of the bhyve tool])
|
|
|
|
AC_DEFINE_UNQUOTED([BHYVECTL], ["$BHYVECTL"],
|
|
|
|
[Location of the bhyvectl tool])
|
|
|
|
AC_DEFINE_UNQUOTED([BHYVELOAD], ["$BHYVELOAD"],
|
|
|
|
[Location of the bhyveload tool])
|
|
|
|
fi
|
|
|
|
AM_CONDITIONAL([WITH_BHYVE], [test "$with_bhyve" = "yes"])
|
|
|
|
])
|
|
|
|
|
2016-06-09 00:50:35 +00:00
|
|
|
dnl Build with gnulib's getopt which contains a reentrant interface
|
|
|
|
AC_DEFUN([gl_REPLACE_GETOPT_ALWAYS], [])
|
|
|
|
|
2014-02-18 10:08:10 +00:00
|
|
|
AC_DEFUN([LIBVIRT_DRIVER_RESULT_BHYVE],[
|
2016-12-14 15:55:30 +00:00
|
|
|
LIBVIRT_RESULT([Bhyve], [$with_bhyve])
|
2014-02-18 10:08:10 +00:00
|
|
|
])
|