-
Notifications
You must be signed in to change notification settings - Fork 10
/
configure.ac
145 lines (131 loc) · 3.6 KB
/
configure.ac
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
AC_PREREQ(2.61)
AC_INIT([disnix], m4_esyscmd([echo -n $(cat ./version)$VERSION_SUFFIX]))
AC_CONFIG_AUX_DIR([config])
AM_INIT_AUTOMAKE([1.9 tar-pax -Wall -Werror -Wno-extra-portability])
# Checks for installed programs
AC_DEFUN([NEED_PROG],
[
AC_PATH_PROG($1, $2)
if test -z "$$1"; then
AC_MSG_ERROR([$2 is required])
fi
])
# Checks for programs
AC_PROG_CC
AC_PROG_INSTALL
AC_PROG_LIBTOOL
AM_PROG_CC_C_O
PKG_PROG_PKG_CONFIG
NEED_PROG(bash, bash)
NEED_PROG(getopt, getopt)
AC_PATH_PROG(xmllint, xmllint, false)
AC_PATH_PROG(xsltproc, xsltproc, false)
AC_PATH_PROG(dblatex, dblatex)
AC_PATH_PROG(HELP2MAN, help2man, false)
AC_PATH_PROG(DOCLIFTER, doclifter, false)
AC_PATH_PROGS(readlink, [greadlink readlink], [na])
if test "$readlink" = na; then
AC_MSG_ERROR([We need a GNU compatible readlink command, i.e. greadlink or readlink needed])
fi
# Checks for glib libraries
GLIB2_REQUIRED=2.26.0
PKG_CHECK_MODULES(GLIB2, glib-2.0 >= $GLIB2_REQUIRED)
AC_SUBST(GLIB2_CFLAGS)
AC_SUBST(GLIB2_LIBS)
PKG_CHECK_MODULES(GIO2, gio-unix-2.0 >= $GLIB2_REQUIRED)
AC_SUBST(GIO2_CFLAGS)
AC_SUBST(GIO2_LIBS)
# Checks for libxml2 libraries
LIBXML2_REQUIRED=2.5.10
PKG_CHECK_MODULES(LIBXML2, libxml-2.0 >= $LIBXML2_REQUIRED)
AC_SUBST(LIBXML2_CFLAGS)
AC_SUBST(LIBXML2_LIBS)
# Checks for libxslt libraries
LIBXSLT_REQUIRED=1.1.10
PKG_CHECK_MODULES(LIBXSLT, libxslt >= $LIBXSLT_REQUIRED)
AC_SUBST(LIBXSLT_CFLAGS)
AC_SUBST(LIBXSLT_LIBS)
# Checks for Docbook stuff
AC_ARG_WITH(docbook-rng, AC_HELP_STRING([--with-docbook-rng=PATH],
[path of the DocBook RelaxNG schema]),
docbookrng=$withval, docbookrng=/docbook-rng-missing)
AC_SUBST(docbookrng)
AC_ARG_WITH(docbook-xsl, AC_HELP_STRING([--with-docbook-xsl=PATH],
[path of the DocBook XSL stylesheets]),
docbookxsl=$withval, docbookxsl=/docbook-xsl-missing)
AC_SUBST(docbookxsl)
# Add D-Bus specific flags
CFLAGS="$CFLAGS $GLIB_DBUS_CFLAGS"
LIBS="$LIBS $GLIB_DBUS_LIBS"
AC_ARG_WITH(dbus-sys, [ --with-dbus-sys=<dir> where D-BUS system.d directory is])
if ! test -z "$with_dbus_sys" ; then
DBUS_SYS_DIR="$with_dbus_sys"
else
DBUS_SYS_DIR="$datadir/dbus-1/system.d"
fi
AC_SUBST(DBUS_SYS_DIR)
# State should be stored in /nix/var, unless the user overrides it explicitly.
test "$localstatedir" = '${prefix}/var' && localstatedir=/nix/var
# Output
AC_CONFIG_FILES([
Makefile
conf/Makefile
src/Makefile
src/disnix.pc
src/build/Makefile
src/compare-manifest/Makefile
src/collect-garbage/Makefile
src/diagnose/Makefile
src/query/Makefile
src/dbus-service/Makefile
src/libprocreact/Makefile
src/libnixxml/Makefile
src/libnixxml-glib/Makefile
src/libmodel/Makefile
src/libdistderivation/Makefile
src/libmain/Makefile
src/libmanifest/Makefile
src/libinfrastructure/Makefile
src/libpkgmgmt/Makefile
src/libstatemgmt/Makefile
src/libprofilemanifest/Makefile
src/libmigrate/Makefile
src/libbuild/Makefile
src/libdeploy/Makefile
src/copy-closure/Makefile
src/copy-snapshots/Makefile
src/distribute/Makefile
src/lock/Makefile
src/set/Makefile
src/activate/Makefile
src/visualize/Makefile
src/snapshot/Makefile
src/restore/Makefile
src/clean-snapshots/Makefile
src/delete-state/Makefile
src/capture-infra/Makefile
src/capture-manifest/Makefile
src/run-activity/Makefile
src/migrate/Makefile
src/deploy/Makefile
src/convert-manifest/Makefile
scripts/Makefile
nix/Makefile
xsl/Makefile
maintenance/Makefile
scripts/checks
scripts/disnix-delegate
scripts/disnix-env
scripts/disnix-instantiate
scripts/disnix-manifest
scripts/disnix-gendist-roundrobin
scripts/disnix-reconstruct
scripts/disnix-ssh-client
scripts/disnix-normalize-infra
scripts/disnix-convert
scripts/disnix-tmpfile
doc/Makefile
doc/manual/Makefile
init.d/Makefile
])
AC_OUTPUT