aboutsummaryrefslogtreecommitdiff
path: root/configure.ac
blob: 0eeae84b77991359c04923e31d8134b67e946eac (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
AC_INIT([guix-build-coordinator], [m4_translit(m4_esyscmd([cat VERSION]),m4_newline)])
AC_CONFIG_AUX_DIR([build-aux])
AM_INIT_AUTOMAKE([gnu color-tests -Wall -Wno-portability foreign])

GUILE_PKG([3.0])
GUILE_PROGS
if test "x$GUILD" = "x"; then
   AC_MSG_ERROR(['guild' binary not found; please check your guile-3.x installation.])
fi

if test "$cross_compiling" != no; then
   GUILE_TARGET="--target=$host_alias"
   AC_SUBST([GUILE_TARGET])
fi

AC_PATH_PROG([guix], [guix])

AC_PATH_PROG([sqitch], [sqitch])
AC_PATH_PROG([sqlite3], [sqlite3])
AC_PATH_PROG([psql], [psql])
AC_PATH_PROG([bzip2], [bzip2])

dnl Check for Guile-zlib.
GUILE_MODULE_AVAILABLE([have_guile_zlib], [(zlib)])
if test "x$have_guile_zlib" != "xyes"; then
  AC_MSG_ERROR([Guile-zlib is missing; please install it.])
fi

dnl Check for Guile-lzlib.
GUILE_MODULE_AVAILABLE([have_guile_lzlib], [(lzlib)])
if test "x$have_guile_lzlib" != "xyes"; then
  AC_MSG_ERROR([Guile-lzlib is missing; please install it.])
fi

dnl Check for Guile-lib.
GUILE_MODULE_AVAILABLE([have_guile_lib], [(logging logger)])
if test "x$have_guile_lib" != "xyes"; then
  AC_MSG_ERROR([Guile-lib is missing; please install it.])
fi

dnl Check for guile-fibers.
GUILE_MODULE_AVAILABLE([have_guile_fibers], [(fibers)])
if test "x$have_guile_fibers" != "xyes"; then
  CONFSOURCES="MINIMALSOURCES"
else
  CONFSOURCES="ALLSOURCES"

  AC_CONFIG_FILES(
    [scripts/guix-build-coordinator],
    [chmod +x scripts/guix-build-coordinator]
  )
  AC_CONFIG_FILES(
    [scripts/guix-build-coordinator-queue-builds-from-guix-data-service],
    [chmod +x scripts/guix-build-coordinator-queue-builds-from-guix-data-service]
  )
fi
AC_SUBST([CONFSOURCES])

AC_CONFIG_FILES([Makefile])
AC_CONFIG_FILES([pre-inst-env], [chmod +x pre-inst-env])
AC_CONFIG_FILES([guix-build-coordinator/config.scm])

AC_CONFIG_FILES(
  [scripts/guix-build-coordinator-agent],
  [chmod +x scripts/guix-build-coordinator-agent]
)

AC_OUTPUT