2 # Copyright (C) 2013 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.
18 AC_INIT([goaljobs],[0.1])
19 AM_INIT_AUTOMAKE([foreign])
21 dnl Only used temporarily while goaljobs.spec is contained in the
22 dnl tarball. We will remove this later.
23 AC_SUBST([RPM_RELEASE],[1])
25 AC_CONFIG_MACRO_DIR([m4])
27 dnl Allow all GNU/Linux functions.
28 dnl autoconf complains unless this is very early in the file.
29 AC_USE_SYSTEM_EXTENSIONS
33 dnl Check for basic C environment.
39 test "x$U" != "x" && AC_MSG_ERROR([Compiler not ANSI compliant])
43 AC_ARG_ENABLE([gcc-warnings],
44 [AS_HELP_STRING([--enable-gcc-warnings],
45 [turn on lots of GCC warnings (for developers)])],
48 *) AC_MSG_ERROR([bad value $enableval for gcc-warnings option]) ;;
50 gcc_warnings=$enableval],
54 if test "$gcc_warnings" = yes; then
55 # XXX With gnulib we can improve this in future.
57 AC_SUBST([WARN_CFLAGS])
58 WERROR_CFLAGS="-Werror"
59 AC_SUBST([WERROR_CFLAGS])
62 dnl Check support for 64 bit file offsets.
67 if test "$OCAMLC" = "no"; then
68 AC_MSG_ERROR([You must install the OCaml compiler])
71 AM_CONDITIONAL([HAVE_OCAMLOPT], [test "x$OCAMLOPT" != "xno"])
73 dnl Camlp4 is required.
75 if test "x$CAMLP4" = "xno"; then
76 AC_MSG_ERROR([You must install camlp4 (the OCaml macro preprocessor)])
79 dnl OCaml findlib ("ocamlfind") is required.
81 if test "x$OCAMLFIND" = "xno"; then
82 AC_MSG_ERROR([You must install OCaml findlib (the ocamlfind command)])
85 dnl Check for POD (for manual pages).
86 AC_CHECK_PROG(PERLDOC,perldoc,perldoc)
87 if test "x$PERLDOC" = "x"; then
88 AC_MSG_ERROR([You must install the perldoc program])
91 AC_CONFIG_HEADERS([config.h])
92 AC_CONFIG_FILES([goaljobs.spec
96 examples/compile-c/Makefile