2 # Process this file with autoconf to produce a configure script.
5 AC_INIT([Guix], [0.0], [guile-user@gnu.org])
6 AC_CONFIG_AUX_DIR([build-aux])
8 AM_INIT_AUTOMAKE([1.11 foreign silent-rules subdir-objects \
9 color-tests parallel-tests])
11 AC_CONFIG_SRCDIR([guix.scm])
12 AC_CONFIG_MACRO_DIR([m4])
14 AM_GNU_GETTEXT([external])
15 AM_GNU_GETTEXT_VERSION([0.18.1])
17 guilemoduledir="${datarootdir}/guile/site/2.0"
18 AC_SUBST([guilemoduledir])
22 PKG_CHECK_MODULES([GUILE], [guile-2.0])
23 AC_PATH_PROG([GUILE], [guile])
24 AC_PATH_PROG([GUILD], [guild])
26 AC_ARG_WITH([nix-prefix],
27 [AS_HELP_STRING([--with-nix-prefix=DIR], [search for Nix in DIR])],
30 *) PATH="$withval/bin:$PATH"; export PATH;;
34 AC_PATH_PROG([NIX_INSTANTIATE], [nix-instantiate])
35 AC_PATH_PROG([NIX_HASH], [nix-hash])
36 if test "x$NIX_INSTANTIATE$NIX_HASH" = "x"; then
37 AC_MSG_ERROR([Nix programs not found; please install Nix or use `--with-nix-prefix'.])
40 AC_ARG_WITH([nixpkgs],
41 [AS_HELP_STRING([--with-nixpkgs=DIR], [search for Nixpkgs in DIR])],
43 yes|no) AC_MSG_ERROR([Please use `--with-nixpkgs=DIR'.]);;
44 *) NIXPKGS="$withval";;
48 if test -f "$NIXPKGS/default.nix"; then
49 AC_MSG_CHECKING([for Nixpkgs source tree])
50 AC_MSG_RESULT([$NIXPKGS])
53 AC_MSG_WARN([Nixpkgs not found; this will prevent most tests from running.])
54 AC_MSG_WARN([Please use `--with-nixpkgs'.])
57 AC_CONFIG_FILES([Makefile
61 AC_CONFIG_COMMANDS([commands-exec], [chmod +x guix-build])