# 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+# 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([qemu-sanity-check],[1.1.1])
+AC_INIT([qemu-sanity-check],[1.1.6])
AM_INIT_AUTOMAKE([foreign])
dnl Check for basic C environment.
AM_PROG_CC_C_O
+AC_CHECK_HEADERS([sys/reboot.h])
+
+dnl Allow the package to override the default list of qemu binary
+dnl names which are tried, since this heavily depends on how qemu
+dnl has been packaged in the downstream distro.
+dnl
+dnl Note that "$canonical_arch" and "$arch" are variables in the
+dnl qemu-sanity-check shell script. Absolute paths could be used
+dnl here as well.
+AC_ARG_WITH([qemu-list],
+ [AS_HELP_STRING([--with-qemu-list],
+ [list of qemu binaries to try @<:@default=qemu-kvm qemu-system-\$canonical_arch qemu kvm@:>@])],
+ [QEMU_LIST="$withval"],
+ [QEMU_LIST="qemu-kvm qemu-system-\$canonical_arch qemu kvm"])
+AC_SUBST([QEMU_LIST])
+
AC_PROG_SED
AC_MSG_CHECKING([that a static binary can be built])