X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=configure.ac;h=bcc5385fdf8f470fd07c7a57d75d890a0d44344b;hb=3039a7bd4c535a96adca368cd5543862e1617541;hp=ccae4b03223ef76468cb4bfc9c55af32c5c8c3b0;hpb=3b56c80718ca0eb1dbde633b569f5ca7313cb4be;p=virt-dmesg.git diff --git a/configure.ac b/configure.ac index ccae4b0..bcc5385 100644 --- a/configure.ac +++ b/configure.ac @@ -1,26 +1,26 @@ -# virt-dmesg -# Copyright (C) 2008-2011 Red Hat Inc. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# 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. - -AC_INIT([virt-dmesg],0.1.0) +dnl virt-dmesg +dnl Copyright (C) 2008-2011 Red Hat Inc. +dnl +dnl This program is free software; you can redistribute it and/or modify +dnl it under the terms of the GNU General Public License as published by +dnl the Free Software Foundation; either version 2 of the License, or +dnl (at your option) any later version. +dnl +dnl This program 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 +dnl GNU General Public License for more details. +dnl +dnl You should have received a copy of the GNU General Public License +dnl along with this program; if not, write to the Free Software +dnl Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +AC_INIT([virt-dmesg],0.3.0) AM_INIT_AUTOMAKE([foreign]) AC_CONFIG_MACRO_DIR([m4]) -# Check for basic C environment. +dnl Check for basic C environment. AC_PROG_CC_STDC AC_PROG_INSTALL AC_PROG_CPP @@ -33,17 +33,56 @@ AM_PROG_CC_C_O AC_GNU_SOURCE AM_GNU_GETTEXT([external]) -AM_GNU_GETTEXT_VERSION([0.17]) +AM_GNU_GETTEXT_VERSION([0.18.1]) dnl Check support for 64 bit file offsets. AC_SYS_LARGEFILE -dnl Check for libvirt. -PKG_CHECK_MODULES([LIBVIRT], [libvirt]) +dnl zlib is required because it contains a crc32 function. +AC_CHECK_LIB([z], [crc32], [], [AC_MSG_ERROR([zlib is required])]) +AC_CHECK_HEADER([zlib.h], [], [AC_MSG_ERROR([zlib is required])]) + +dnl Check for basic OCaml environment & findlib. +AC_PROG_OCAML + +if test "x$OCAMLC" = "xno"; then + AC_MSG_ERROR([OCaml compiler is required]) +fi + +AM_CONDITIONAL([HAVE_OCAMLOPT], [test "x$OCAMLOPT" != "xno"]) + +AC_PROG_FINDLIB + +if test "x$OCAMLFIND" = "xno"; then + AC_MSG_ERROR([OCaml findlib is required]) +fi + +dnl Check for required OCaml packages. +AC_CHECK_OCAML_PKG(unix) +if test "x$OCAML_PKG_unix" = "xno"; then + AC_MSG_ERROR([Cannot find required OCaml package 'unix']) +fi + +AC_CHECK_OCAML_PKG(libvirt) +if test "x$OCAML_PKG_libvirt" = "xno"; then + AC_MSG_ERROR([Cannot find required OCaml package 'libvirt']) +fi + +dnl Enable profiling. +AC_MSG_CHECKING([if we should enable profiling]) +AC_ARG_ENABLE([profiling], + AS_HELP_STRING([--enable-profiling], + [turn on gprof profiling in binaries (for developers)]), + [profiling=$enable_profiling], + [profiling=no]) +AC_MSG_RESULT([$profiling]) +AM_CONDITIONAL([PROFILING], [test "x$profiling" != "xno"]) -# Generate output files. +dnl Generate output files. AC_CONFIG_HEADERS([config.h]) AC_CONFIG_FILES([Makefile + man/Makefile po/Makefile.in + src/config.ml src/Makefile]) AC_OUTPUT