2 # Copyright (C) 2016 Red Hat Inc.
4 # This program is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
6 # the Free Software Foundation; either version 2 of the License, or
7 # (at your option) any later version.
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
14 # You should have received a copy of the GNU General Public License
15 # along with this program; if not, write to the Free Software
16 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19 AM_INIT_AUTOMAKE([foreign])
21 AC_SUBST([RPM_RELEASE],[1])
23 AC_CONFIG_MACRO_DIR([m4])
25 dnl Allow all GNU/Linux functions.
26 dnl autoconf complains unless this is very early in the file.
27 AC_USE_SYSTEM_EXTENSIONS
31 dnl Check for basic C environment.
37 test "x$U" != "x" && AC_MSG_ERROR([Compiler not ANSI compliant])
41 AC_ARG_ENABLE([gcc-warnings],
42 [AS_HELP_STRING([--enable-gcc-warnings],
43 [turn on lots of GCC warnings (for developers)])],
46 *) AC_MSG_ERROR([bad value $enableval for gcc-warnings option]) ;;
48 gcc_warnings=$enableval],
52 if test "$gcc_warnings" = yes; then
53 # XXX With gnulib we can improve this in future.
55 AC_SUBST([WARN_CFLAGS])
56 WERROR_CFLAGS="-Werror"
57 AC_SUBST([WERROR_CFLAGS])
60 dnl Check support for 64 bit file offsets.
65 if test "$OCAMLC" = "no"; then
66 AC_MSG_ERROR([You must install the OCaml compiler])
69 AM_CONDITIONAL([HAVE_OCAMLOPT], [test "x$OCAMLOPT" != "xno"])
71 dnl OCaml findlib ("ocamlfind") is required.
73 if test "x$OCAMLFIND" = "xno"; then
74 AC_MSG_ERROR([You must install OCaml findlib (the ocamlfind command)])
77 dnl Check for OCaml package Calendar (required).
78 AC_CHECK_OCAML_PKG(calendar)
79 if test "x$OCAML_PKG_calendar" = "xno"; then
80 AC_MSG_ERROR([You must install the 'ocaml-calendar' library])
83 dnl Check for OCaml package PG'OCaml (required).
84 AC_CHECK_OCAML_PKG(pgocaml)
85 if test "x$OCAML_PKG_pgocaml" = "xno"; then
86 AC_MSG_ERROR([You must install the 'ocaml-pgocaml' library])
89 dnl Check for OCaml package PCRE (required).
90 AC_CHECK_OCAML_PKG(pcre)
91 if test "x$OCAML_PKG_pcre" = "xno"; then
92 AC_MSG_ERROR([You must install the 'ocaml-pcre' library])
95 dnl Check for POD (for manual pages).
96 AC_CHECK_PROG(POD2MAN,pod2man,pod2man,no)
97 AM_CONDITIONAL([HAVE_POD2MAN],
98 [test "x$POD2MAN" != "xno"])
100 AC_CONFIG_HEADERS([config.h])
101 AC_CONFIG_FILES([todo_config.ml