2011-01-14 10:52:40 +00:00
|
|
|
AC_INIT([Hydra], [m4_esyscmd([echo -n $(cat ./version)$VERSION_SUFFIX])],
|
|
|
|
[nix-dev@cs.uu.nl], [hydra], [http://nixos.org/hydra/])
|
2010-09-30 14:29:15 +00:00
|
|
|
AM_INIT_AUTOMAKE([foreign])
|
|
|
|
|
2011-01-14 10:52:44 +00:00
|
|
|
AC_LANG([C++])
|
|
|
|
|
2010-09-30 14:29:15 +00:00
|
|
|
AC_PROG_CC
|
|
|
|
AC_PROG_INSTALL
|
|
|
|
AC_PROG_LN_S
|
|
|
|
AC_PROG_LIBTOOL
|
|
|
|
AC_PROG_CXX
|
|
|
|
|
2011-07-04 14:48:38 +00:00
|
|
|
dnl Optional dependencies to build the manual, normally not needed
|
|
|
|
dnl since the tarball comes with the PDF and HTML manuals.
|
|
|
|
AC_PATH_PROG([DBLATEX], [dblatex])
|
|
|
|
AC_PATH_PROG([XSLTPROC], [xsltproc])
|
|
|
|
|
|
|
|
AC_ARG_WITH([docbook-xsl],
|
|
|
|
[AS_HELP_STRING([--with-docbook-xsl=PATH],
|
|
|
|
[path of the DocBook XSL stylesheets])],
|
|
|
|
[docbookxsl="$withval"],
|
|
|
|
[docbookxsl="/docbook-xsl-missing"])
|
|
|
|
AC_SUBST([docbookxsl])
|
2010-09-30 14:29:15 +00:00
|
|
|
|
|
|
|
|
|
|
|
AC_DEFUN([NEED_PROG],
|
|
|
|
[
|
|
|
|
AC_PATH_PROG($1, $2)
|
|
|
|
if test -z "$$1"; then
|
|
|
|
AC_MSG_ERROR([$2 is required])
|
|
|
|
fi
|
|
|
|
])
|
|
|
|
|
|
|
|
NEED_PROG(perl, perl)
|
|
|
|
|
|
|
|
AC_ARG_WITH(nix, AC_HELP_STRING([--with-nix=PATH],
|
|
|
|
[prefix of nix]),
|
|
|
|
nix=$withval, nix=/nix-missing)
|
|
|
|
AC_SUBST(nix)
|
|
|
|
|
2011-10-04 20:03:49 +00:00
|
|
|
PATH="$nix:$PATH"
|
|
|
|
export PATH
|
|
|
|
|
2011-10-04 20:19:14 +00:00
|
|
|
NEED_PROG([NIX_STORE_PROGRAM], [nix-store])
|
2011-10-04 20:03:49 +00:00
|
|
|
|
2011-10-04 20:19:14 +00:00
|
|
|
AC_MSG_CHECKING([whether $NIX_STORE_PROGRAM is recent enough])
|
2011-10-04 20:53:47 +00:00
|
|
|
if test -n "$NIX_STORE" -a test -n "$TMPDIR"
|
|
|
|
then
|
|
|
|
# This may be executed from within a build chroot, so pacify
|
|
|
|
# `nix-store' instead of letting it choke while trying to mkdir
|
|
|
|
# /nix/var.
|
|
|
|
NIX_STATE_DIR="$TMPDIR"
|
|
|
|
export NIX_STATE_DIR
|
|
|
|
fi
|
2011-10-04 20:19:14 +00:00
|
|
|
if "$NIX_STORE_PROGRAM" --timeout 123 -q > /dev/null 2>&1
|
2011-10-04 20:03:49 +00:00
|
|
|
then
|
|
|
|
AC_MSG_RESULT([yes])
|
|
|
|
else
|
|
|
|
AC_MSG_RESULT([no])
|
2011-10-04 20:19:14 +00:00
|
|
|
AC_MSG_ERROR([`$NIX_STORE_PROGRAM' doesn't support `--timeout'; please use a newer version.])
|
2011-10-04 20:03:49 +00:00
|
|
|
fi
|
|
|
|
|
2011-01-14 10:52:44 +00:00
|
|
|
old_CPPFLAGS="$CPPFLAGS"
|
|
|
|
old_LIBS="$LIBS"
|
|
|
|
|
2011-10-04 13:31:05 +00:00
|
|
|
CPPFLAGS="$CPPFLAGS -I$nix/include/nix"
|
|
|
|
LDFLAGS="$LDFLAGS -L$nix/lib/nix"
|
2011-01-14 10:52:44 +00:00
|
|
|
|
|
|
|
AC_CHECK_HEADER([store-api.hh], [:],
|
|
|
|
[AC_MSG_ERROR([Nix headers not found; please install Nix or check the `--with-nix' option.])])
|
2011-08-19 15:28:32 +00:00
|
|
|
AC_CHECK_LIB([expr], [_ZN3nix9EvalState17parseExprFromFileESs], [:],
|
2011-03-16 13:19:15 +00:00
|
|
|
[AC_MSG_ERROR([Nix library not found; please install Nix or check the `--with-nix' option.])])
|
2011-01-14 10:52:44 +00:00
|
|
|
|
|
|
|
CPPFLAGS="$old_CPPFLAGS"
|
|
|
|
LIBS="$old_LIBS"
|
|
|
|
|
2011-01-14 12:53:54 +00:00
|
|
|
PKG_CHECK_MODULES([BDW_GC], [bdw-gc])
|
|
|
|
|
2011-03-17 13:25:27 +00:00
|
|
|
testPath="$(dirname $(type -p expr))"
|
|
|
|
AC_SUBST(testPath)
|
|
|
|
|
2010-09-30 14:29:15 +00:00
|
|
|
AC_CONFIG_FILES([
|
|
|
|
Makefile
|
|
|
|
doc/Makefile
|
|
|
|
doc/manual/Makefile
|
|
|
|
src/Makefile
|
|
|
|
src/c/Makefile
|
|
|
|
src/sql/Makefile
|
|
|
|
src/xsl/Makefile
|
|
|
|
src/lib/Makefile
|
|
|
|
src/root/Makefile
|
|
|
|
src/script/Makefile
|
2011-03-16 08:50:31 +00:00
|
|
|
tests/Makefile
|
2011-03-17 13:25:27 +00:00
|
|
|
tests/jobs/config.nix
|
2010-09-30 14:29:15 +00:00
|
|
|
])
|
2011-03-17 07:39:46 +00:00
|
|
|
|
|
|
|
AC_CONFIG_FILES([src/script/hydra_build.pl], [chmod +x src/script/hydra_build.pl])
|
|
|
|
AC_CONFIG_FILES([src/script/hydra_create.pl], [chmod +x src/script/hydra_create.pl])
|
|
|
|
AC_CONFIG_FILES([src/script/hydra_evaluator.pl], [chmod +x src/script/hydra_evaluator.pl])
|
|
|
|
AC_CONFIG_FILES([src/script/hydra_queue_runner.pl], [chmod +x src/script/hydra_queue_runner.pl])
|
|
|
|
AC_CONFIG_FILES([src/script/hydra_server.pl], [chmod +x src/script/hydra_server.pl])
|
|
|
|
AC_CONFIG_FILES([src/script/hydra_update_gc_roots.pl], [chmod +x src/script/hydra_update_gc_roots.pl])
|
|
|
|
AC_CONFIG_FILES([tests/query-all-tables.pl], [chmod +x tests/query-all-tables.pl])
|
|
|
|
AC_CONFIG_FILES([tests/evaluation-tests.pl], [chmod +x tests/evaluation-tests.pl])
|
|
|
|
|
2010-09-30 14:29:15 +00:00
|
|
|
AC_OUTPUT
|
|
|
|
|