forked from rauc/rauc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure.ac
139 lines (117 loc) · 5.12 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
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ([2.69])
AC_INIT([rauc], m4_esyscmd([./build-aux/git-version-gen .tarball-version]), [[email protected]])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_AUX_DIR([build-aux])
# Use subdir-object for single-Makefile build
# Use foreign to prevent warnings for missing files
# such as README, NEWS
AM_INIT_AUTOMAKE([1.11 subdir-objects foreign no-dist-gzip dist-xz])
AM_MAINTAINER_MODE([enable])
AM_SILENT_RULES([yes])
AC_REQUIRE_AUX_FILE([tap-driver.sh])
AC_REQUIRE_AUX_FILE([git-version-gen])
AX_IS_RELEASE([git-directory])
AX_CHECK_ENABLE_DEBUG([yes])
AC_USE_SYSTEM_EXTENSIONS
AC_SYS_LARGEFILE
AX_COMPILER_FLAGS
# Checks for programs.
AC_PROG_AWK
AC_PROG_MKDIR_P
AC_PROG_SED
AC_PROG_CC
AC_PROG_CC_C99
AM_PROG_CC_C_O
AC_CHECK_PROGS(CATCHSEGV, [catchsegv])
LT_PREREQ(2.2)
LT_INIT([disable-static])
AX_CODE_COVERAGE
AX_VALGRIND_CHECK
# Check for features.
AC_ARG_ENABLE([service],
AS_HELP_STRING([--disable-service], [Disable background service])
)
AS_IF([test "x$enable_service" != "xno"], [
AC_DEFINE([ENABLE_SERVICE], [1], [Define to 1 to enable background service])
], [
AC_DEFINE([ENABLE_SERVICE], [0])
])
# Checks for libraries.
PKG_CHECK_MODULES([GLIB], [glib-2.0 >= 2.40 gio-2.0 gio-unix-2.0])
AC_ARG_ENABLE([network],
AS_HELP_STRING([--disable-network], [Disable network update mode])
)
AM_CONDITIONAL([WANT_NETWORK], [test x$enable_network != xno])
AS_IF([test "x$enable_network" != "xno"], [
AC_DEFINE([ENABLE_NETWORK], [1], [Define to 1 to enable building with JSON support])
PKG_CHECK_MODULES([CURL], [libcurl])
], [
AC_DEFINE([ENABLE_NETWORK], [0])
])
AC_ARG_ENABLE([json],
AS_HELP_STRING([--disable-json], [Disable JSON support])
)
AM_CONDITIONAL([WANT_JSON], [test x$enable_json != xno])
AS_IF([test "x$enable_json" != "xno"], [
AC_DEFINE([ENABLE_JSON], [1], [Define to 1 to enable building with JSON support])
PKG_CHECK_MODULES([JSON_GLIB], [json-glib-1.0])
], [
AC_DEFINE([ENABLE_JSON], [0])
])
AX_CHECK_OPENSSL([],[AC_MSG_ERROR([OpenSSL not found])])
AC_ARG_WITH([systemdunitdir], AC_HELP_STRING([--with-systemdunitdir=DIR],
[path to systemd service directory]), [with_systemdunitdir=${withval}],
[with_systemdunitdir="`$PKG_CONFIG --variable=systemdsystemunitdir systemd`"])
if (test -n "${with_systemdunitdir}"); then
SYSTEMD_UNITDIR="${with_systemdunitdir}"
AC_SUBST(SYSTEMD_UNITDIR)
fi
AM_CONDITIONAL(SYSTEMD, test -n "${with_systemdunitdir}")
AC_ARG_WITH([dbuspolicydir],
AS_HELP_STRING([--with-dbuspolicydir=DIR], [D-Bus policy directory]),
[],
[with_dbuspolicydir=${datadir}/dbus-1/system.d])
DBUS_POLICYDIR="${with_dbuspolicydir}"
AC_SUBST(DBUS_POLICYDIR)
AC_ARG_WITH([dbussystemservicedir],
AS_HELP_STRING([--with-dbussystemservicedir=DIR], [D-Bus system service directory]),
[],
[with_dbussystemservicedir=${datadir}/dbus-1/system-services])
DBUS_SYSTEMSERVICEDIR="${with_dbussystemservicedir}"
AC_SUBST(DBUS_SYSTEMSERVICEDIR)
# Checks for header files.
# Checks for typedefs, structures, and compiler characteristics.
# Checks for library functions.
AC_CONFIG_LINKS([test/test.conf:test/test.conf])
AC_CONFIG_LINKS([test/bin/postinstall.sh:test/bin/postinstall.sh])
AC_CONFIG_LINKS([test/bin/fw_setenv:test/bin/fw_setenv])
AC_CONFIG_LINKS([test/bin/grub-editenv:test/bin/grub-editenv])
AC_CONFIG_LINKS([test/bin/barebox-state:test/bin/barebox-state])
AC_CONFIG_LINKS([test/bin/preinstall.sh:test/bin/preinstall.sh])
AC_CONFIG_LINKS([test/bin/systeminfo.sh:test/bin/systeminfo.sh])
AC_CONFIG_LINKS([test/good-bundle.raucb:test/good-bundle.raucb])
AC_CONFIG_LINKS([test/manifest.raucm:test/manifest.raucm])
AC_CONFIG_LINKS([test/openssl-ca/manifest:test/openssl-ca/manifest])
AC_CONFIG_LINKS([test/openssl-ca/dev/autobuilder-1.cert.pem:test/openssl-ca/dev/autobuilder-1.cert.pem])
AC_CONFIG_LINKS([test/openssl-ca/dev/private/autobuilder-1.pem:test/openssl-ca/dev/private/autobuilder-1.pem])
AC_CONFIG_LINKS([test/openssl-ca/dev-ca.pem:test/openssl-ca/dev-ca.pem])
AC_CONFIG_LINKS([test/openssl-ca/rel/release-1.cert.pem:test/openssl-ca/rel/release-1.cert.pem])
AC_CONFIG_LINKS([test/openssl-ca/rel/private/release-1.pem:test/openssl-ca/rel/private/release-1.pem])
AC_CONFIG_LINKS([test/openssl-ca/manifest-r1.sig:test/openssl-ca/manifest-r1.sig])
AC_CONFIG_LINKS([test/rauc.t:test/rauc.t])
AC_CONFIG_LINKS([test/rootfs.raucs:test/rootfs.raucs])
AC_CONFIG_LINKS([test/services/de.pengutronix.rauc.service.in:test/services/de.pengutronix.rauc.service.in])
AC_CONFIG_LINKS([test/sharness.sh:test/sharness.sh])
AC_CONFIG_LINKS([test/install-content/appfs.img:test/install-content/appfs.img])
AC_CONFIG_LINKS([test/install-content/rootfs.img:test/install-content/rootfs.img])
AC_CONFIG_LINKS([test/install-content/hook.sh:test/install-content/hook.sh])
AC_CONFIG_LINKS([test/install-content/custom_handler.sh:test/install-content/custom_handler.sh])
AC_CONFIG_LINKS([test/install-content/manifest.raucm:test/install-content/manifest.raucm])
AC_CONFIG_FILES([
Makefile
test/services/de.pengutronix.rauc.service
])
AC_OUTPUT