diff options
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 3249 |
1 files changed, 1294 insertions, 1955 deletions
diff --git a/configure.ac b/configure.ac index 770ba499e..316257f97 100644 --- a/configure.ac +++ b/configure.ac | |||
@@ -1,5 +1,5 @@ | |||
1 | # This file is part of GNUnet. | 1 | # This file is part of GNUnet. |
2 | # (C) 2001--2021 GNUnet e.V. | 2 | # (C) 2001--2023 GNUnet e.V. |
3 | # | 3 | # |
4 | # GNUnet is free software: you can redistribute it and/or modify it | 4 | # GNUnet is free software: you can redistribute it and/or modify it |
5 | # under the terms of the GNU Affero General Public License as published | 5 | # under the terms of the GNU Affero General Public License as published |
@@ -20,332 +20,336 @@ | |||
20 | # | 20 | # |
21 | # | 21 | # |
22 | AC_PREREQ([2.69]) | 22 | AC_PREREQ([2.69]) |
23 | # Checks for programs. | 23 | AC_INIT([gnunet],[m4_esyscmd_s(sh scripts/get_version.sh)],[bug-gnunet@gnu.org]) |
24 | AC_INIT([gnunet],[0.15.4-alpha.0],[bug-gnunet@gnu.org]) | 24 | |
25 | gnunet_version=m4_esyscmd_s(sh scripts/get_version.sh) | ||
26 | gnunet_major_version=m4_esyscmd_s(sh scripts/get_version.sh --major) | ||
27 | gnunet_minor_version=m4_esyscmd_s(sh scripts/get_version.sh --minor) | ||
28 | gnunet_micro_version=m4_esyscmd_s(sh scripts/get_version.sh --micro) | ||
29 | |||
30 | AC_SUBST([gnunet_version]) | ||
31 | AC_SUBST([gnunet_major_version]) | ||
32 | AC_SUBST([gnunet_minor_version]) | ||
33 | AC_SUBST([gnunet_micro_version]) | ||
34 | |||
25 | AC_CONFIG_AUX_DIR([build-aux]) | 35 | AC_CONFIG_AUX_DIR([build-aux]) |
36 | AC_CONFIG_MACRO_DIRS([m4]) | ||
26 | 37 | ||
27 | # check for legacy option that is no longer supported (#5627) and fail hard | 38 | AC_CONFIG_HEADERS([gnunet_private_config.h]) |
28 | AC_ARG_WITH(nssdir, | ||
29 | [ --with-nssdir=DIR legacy switch, no longer supported, do not use], | ||
30 | [AC_MSG_RESULT([$with_nssdir]) | ||
31 | AS_CASE([$with_nssdir], | ||
32 | [no],[], | ||
33 | [AC_MSG_ERROR([--with-nssdir is no longer supported])]) | ||
34 | ]) | ||
35 | 39 | ||
36 | AC_CANONICAL_TARGET | 40 | AC_CANONICAL_TARGET |
37 | AC_CANONICAL_HOST | 41 | AC_CANONICAL_HOST |
38 | AM_INIT_AUTOMAKE | 42 | |
39 | m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])], [AM_DEFAULT_VERBOSITY=1 AC_SUBST(AM_DEFAULT_VERBOSITY)]) | 43 | AM_INIT_AUTOMAKE([tar-ustar]) |
40 | AC_CONFIG_HEADERS([gnunet_config.h]) | 44 | AM_SILENT_RULES([yes]) |
41 | AH_TOP([#define _GNU_SOURCE 1]) | 45 | |
42 | AC_CONFIG_MACRO_DIR([m4]) | 46 | # maybe use AC_USE_SYSTEM_EXTENSIONS? |
47 | AH_TOP([#define _GNU_SOURCE 1]) | ||
48 | |||
43 | AC_PROG_AWK | 49 | AC_PROG_AWK |
44 | AC_PROG_CC | 50 | AC_PROG_CC |
45 | AC_PROG_OBJC | 51 | AC_PROG_CC_C_O |
46 | AC_PROG_INSTALL | 52 | AC_PROG_INSTALL |
47 | AC_PROG_LN_S | 53 | AC_PROG_LN_S |
48 | AC_PROG_MAKE_SET | 54 | AC_PROG_MAKE_SET |
49 | AM_PROG_CC_C_O | 55 | AC_PROG_MKDIR_P |
56 | PKG_PROG_PKG_CONFIG([0.29.2]) | ||
57 | |||
50 | LT_INIT([disable-static dlopen]) | 58 | LT_INIT([disable-static dlopen]) |
51 | AC_SUBST(MKDIR_P) | ||
52 | 59 | ||
53 | # allow for different autotools | 60 | AS_IF([test "x$enable_shared" = "xno"], |
61 | [AC_MSG_ERROR([GNUnet works only with shared libraries, sorry])]) | ||
62 | |||
54 | AS_AUTOTOOLS_ALTERNATE | 63 | AS_AUTOTOOLS_ALTERNATE |
55 | 64 | ||
56 | # large file support | ||
57 | AC_SYS_LARGEFILE | 65 | AC_SYS_LARGEFILE |
58 | AC_FUNC_FSEEKO | 66 | AC_FUNC_FSEEKO |
67 | AC_UNALIGNED_64_ACCESS | ||
59 | 68 | ||
60 | 69 | # Helper to check cflags for compiler | |
61 | CFLAGS="-Wall $CFLAGS" | 70 | # CC_CHECK_CFLAGS(FLAG, [ACTION-IF-FOUND, [ACTION-IF-NOT-FOUND]]) |
62 | AC_MSG_CHECKING(whether cc can use -fno-strict-aliasing) | 71 | AC_DEFUN([CC_CHECK_CFLAGS_SILENT], |
63 | # use '-fno-strict-aliasing', but only if the compiler can take it | 72 | [AC_CACHE_VAL([AS_TR_SH([cc_cv_cflags_$1])], |
64 | AS_IF([$CC -fno-strict-aliasing -S -o /dev/null -xc /dev/null >/dev/null 2>&1], | 73 | [ac_save_CFLAGS="$CFLAGS" |
65 | [CFLAGS="-fno-strict-aliasing $CFLAGS"]) | 74 | CFLAGS="$CFLAGS $1 -Werror" |
66 | 75 | AC_LINK_IFELSE([AC_LANG_SOURCE([int main() { return 0; }])], | |
67 | # A helper which allows us to check cflags if compiler | 76 | [eval "AS_TR_SH([cc_cv_cflags_$1])='yes'"], |
68 | AC_DEFUN([CC_CHECK_CFLAGS_SILENT], [ | 77 | [eval "AS_TR_SH([cc_cv_cflags_$1])='no'"]) |
69 | AC_CACHE_VAL(AS_TR_SH([cc_cv_cflags_$1]), | 78 | CFLAGS="$ac_save_CFLAGS"]) |
70 | [ac_save_CFLAGS="$CFLAGS" | 79 | AS_IF([eval test "x$]AS_TR_SH([cc_cv_cflags_$1])[" = "xyes"], |
71 | CFLAGS="$CFLAGS $1 -Werror" | 80 | [$2], |
72 | AC_LINK_IFELSE([AC_LANG_SOURCE([int main() { return 0; }])], | 81 | [$3]) |
73 | [eval "AS_TR_SH([cc_cv_cflags_$1])='yes'"], | 82 | ])dnl |
74 | [eval "AS_TR_SH([cc_cv_cflags_$1])='no'"]) | 83 | |
75 | CFLAGS="$ac_save_CFLAGS" | 84 | # Check for FLAG and append it to CFLAGS if supported |
76 | ]) | 85 | # CC_CHECK_CFLAG_APPEND(FLAG, [ACTION-IF-FOUND, [ACTION-IF-NOT-FOUND]]) |
77 | 86 | AC_DEFUN([CC_CHECK_CFLAG_APPEND], | |
78 | AS_IF([eval test x$]AS_TR_SH([cc_cv_cflags_$1])[ = xyes], | 87 | [AC_CACHE_CHECK([if $CC supports $1], |
79 | [$2], [$3]) | 88 | [AS_TR_SH([cc_cv_cflags_$1])], |
80 | ]) | 89 | [CC_CHECK_CFLAGS_SILENT([$1])]) |
81 | 90 | AS_IF([eval test "x$]AS_TR_SH([cc_cv_cflags_$1])[" = "xyes"], | |
82 | 91 | [CFLAGS="$CFLAGS $1"; $2], | |
83 | # CC_CHECK_CFLAG_APPEND(FLAG, [action-if-found], [action-if-not-found]) | 92 | [$3]) |
84 | # Check for CFLAG and appends them to CFLAGS if supported | 93 | ])dnl |
85 | AC_DEFUN([CC_CHECK_CFLAG_APPEND], [ | 94 | |
86 | AC_CACHE_CHECK([if $CC supports -Wno-$1 flag], | 95 | # Workaround for GCC not doing the proper thing when using a '-Wno' flag. |
87 | AS_TR_SH([cc_cv_cflags_-W$1]), | 96 | # Works like CC_CHECK_CFLAG_APPEND except that the '-Wno' prefix is omitted |
88 | CC_CHECK_CFLAGS_SILENT([-W$1]) #gcc is stupid. It does not fail with the -W-no option for backwards compat but then shows the error "in case something goes wrong". | 97 | # (e.g. '-Wno-foo' becomes 'foo') |
89 | ) | 98 | AC_DEFUN([CC_CHECK_CFLAG_WNO_APPEND], |
90 | 99 | [AC_CACHE_CHECK([if $CC supports -Wno-$1], | |
91 | AS_IF([eval test x$]AS_TR_SH([cc_cv_cflags_-W$1])[ = xyes], | 100 | [AS_TR_SH([cc_cv_cflags__W$1])], |
92 | [CFLAGS="$CFLAGS -Wno-$1"; $2], [$3]) | 101 | [CC_CHECK_CFLAGS_SILENT([-W$1])]) |
93 | ]) | 102 | AS_IF([eval test "x$]AS_TR_SH([cc_cv_cflags__W$1])[" = "xyes"], |
94 | 103 | [CFLAGS="$CFLAGS -Wno-$1"; $2], | |
95 | 104 | [$3]) | |
96 | # We make heavy use of this, llvm/gcc and gcc-9 give warnings so disable. | 105 | ])dnl |
97 | CC_CHECK_CFLAG_APPEND([address-of-packed-member]) | 106 | |
98 | 107 | # Use no-strict-aliasing only if the compiler supports it | |
99 | # We make heavy use of this, llvm/gcc and gcc-9 give warnings so disable. | 108 | CC_CHECK_CFLAG_APPEND([-fno-strict-aliasing]) |
100 | CC_CHECK_CFLAG_APPEND([tautological-constant-out-of-range-compare]) | 109 | |
101 | 110 | # We make heavy use of these, gcc 9 gives warnings so disable them. | |
102 | # Use Linux interface name unless the OS has a different preference | 111 | CC_CHECK_CFLAG_WNO_APPEND([address-of-packed-member]) |
103 | DEFAULT_INTERFACE="\"eth0\"" | 112 | CC_CHECK_CFLAG_WNO_APPEND([tautological-constant-out-of-range-compare]) |
104 | |||
105 | funcstocheck="getnameinfo gethostname gethostbyname gethostbyaddr getaddrinfo getaddrinfo_a" | ||
106 | |||
107 | # Srcdir in a form that native compiler understands (i.e. DOS path on W32) | ||
108 | native_srcdir=$srcdir | ||
109 | 113 | ||
110 | OLD_LDFLAGS="$LDFLAGS" | 114 | OLD_LDFLAGS="$LDFLAGS" |
111 | LDFLAGS="$LDFLAGS -Wl,--unresolved-symbols=report-all" | 115 | LDFLAGS="$LDFLAGS -Wl,--unresolved-symbols=report-all" |
112 | 116 | ||
113 | # Check system type | ||
114 | AS_CASE(["$host_os"], | 117 | AS_CASE(["$host_os"], |
115 | [*darwin* | *rhapsody* | *macosx*],[ | 118 | [*darwin*|*rhapsody*|*macosx*], |
116 | AC_DEFINE_UNQUOTED(DARWIN,1,[This is an Apple Darwin system]) | 119 | [AC_DEFINE([DARWIN],[1],[Define to 1 if this is an Apple Darwin system]) |
117 | CPPFLAGS="-D_APPLE_C_SOURCE $CPPFLAGS" | 120 | CPPFLAGS="-D_APPLE_C_SOURCE $CPPFLAGS" |
118 | CFLAGS="-fno-common -D__APPLE_USE_RFC_3542 $CFLAGS" | 121 | CFLAGS="-fno-common -D__APPLE_USE_RFC_3542 $CFLAGS" |
119 | LDFLAGS="$OLD_LDFLAGS" | 122 | LDFLAGS="$OLD_LDFLAGS" |
120 | AC_MSG_WARN([WARNING: The VPN application cannot be compiled on your OS]) | 123 | build_target="darwin" |
121 | AC_CHECK_LIB(intl, gettext) | 124 | DEFAULT_INTERFACE="\"en0\"" |
122 | build_target="darwin" | 125 | LIBPREFIX= |
123 | DEFAULT_INTERFACE="\"en0\"" | 126 | DLLDIR=lib |
124 | LIBPREFIX= | 127 | UNIXONLY="#" |
125 | DLLDIR=lib | 128 | AC_CHECK_LIB([intl], [gettext])], |
126 | UNIXONLY="#" | 129 | [linux*], |
127 | ], | 130 | [AC_DEFINE([LINUX],[1],[Define to 1 if this is a system with a Linux kernel]) |
128 | [linux*],[ | 131 | build_target="linux" |
129 | AC_DEFINE_UNQUOTED(LINUX,1,[This is a Linux kernel]) | 132 | DEFAULT_INTERFACE="\"eth0\"" |
130 | build_target="linux" | 133 | LIBPREFIX= |
131 | LIBPREFIX= | 134 | DLLDIR=lib |
132 | DLLDIR=lib | 135 | UNIXONLY="#" |
133 | UNIXONLY="#" | 136 | AC_PATH_XTRA |
134 | AC_PATH_XTRA | ||
135 | ], | 137 | ], |
136 | [*freebsd*],[ | 138 | [*freebsd*], |
137 | CFLAGS="-D_THREAD_SAFE $CFLAGS" | 139 | [CFLAGS="-D_THREAD_SAFE $CFLAGS" |
138 | build_target="freebsd" | 140 | build_target="freebsd" |
139 | LIBPREFIX= | 141 | DEFAULT_INTERFACE="\"lo0\"" |
140 | DLLDIR=lib | 142 | xbsd="yes" |
141 | UNIXONLY="#" | 143 | LIBPREFIX= |
144 | DLLDIR=lib | ||
145 | UNIXONLY="#" | ||
142 | ], | 146 | ], |
143 | [*openbsd*],[ | 147 | [*openbsd*], |
144 | # We need to explicitly link libc | 148 | [AC_DEFINE([OPENBSD],[1],[Define to 1 if this is an OpenBSD system]) |
145 | LDFLAGS="$LDFLAGS -Wl,-lc" | 149 | # libc needs to be linked explicitly |
146 | # We also need to enable PIC | 150 | LDFLAGS="$OLD_LDFLAGS -lc" |
147 | CFLAGS="-fPIC $CFLAGS" | 151 | # and PIC has to be enabled |
148 | build_target="openbsd" | 152 | CFLAGS="-fPIC $CFLAGS" |
149 | LIBPREFIX= | 153 | build_target="openbsd" |
150 | DLLDIR=lib | 154 | DEFAULT_INTERFACE="\"lo0\"" |
151 | UNIXONLY="#" | 155 | xbsd="yes" |
156 | LIBPREFIX= | ||
157 | DLLDIR=lib | ||
158 | UNIXONLY="#" | ||
152 | ], | 159 | ], |
153 | [*netbsd*],[ | 160 | [*netbsd*], |
154 | build_target="netbsd" | 161 | [build_target="netbsd" |
155 | LIBPREFIX= | 162 | DEFAULT_INTERFACE="\"lo0\"" |
156 | DLLDIR=lib | 163 | xbsd="yes" |
157 | UNIXONLY="#" | 164 | LIBPREFIX= |
165 | DLLDIR=lib | ||
166 | UNIXONLY="#" | ||
158 | ], | 167 | ], |
159 | [*solaris*],[ | 168 | [*solaris*], |
160 | AC_DEFINE_UNQUOTED(SOLARIS,1,[This is a Solaris system]) | 169 | [AC_DEFINE([SOLARIS],[1],[Define to 1 if this is a Solaris system]) |
161 | AC_DEFINE_UNQUOTED(_REENTRANT,1,[Need with solaris or errno does not work]) | 170 | AC_DEFINE([_REENTRANT],[1],[Needed with Solaris or errno does not work]) |
162 | AC_CHECK_LIB(resolv, res_init) | 171 | AC_CHECK_LIB([resolv], [res_init]) |
163 | AC_CHECK_LIB(rt, nanosleep) | 172 | AC_CHECK_LIB([rt], [nanosleep]) |
164 | build_target="solaris" | 173 | build_target="solaris" |
165 | LIBPREFIX= | 174 | DEFAULT_INTERFACE="\"eth0\"" |
166 | DLLDIR=lib | 175 | LIBPREFIX= |
167 | UNIXONLY="#" | 176 | DLLDIR=lib |
177 | UNIXONLY="#" | ||
168 | ], | 178 | ], |
169 | [*arm-linux*],[ | 179 | [*arm-linux*], |
170 | AC_DEFINE_UNQUOTED(LINUX,1,[This is a Linux kernel]) | 180 | [AC_DEFINE([LINUX],[1],[Define to 1 if this is a system with a Linux kernel]) |
171 | CFLAGS="-D_REENTRANT -fPIC -pipe $CFLAGS" | 181 | CFLAGS="-D_REENTRANT -fPIC -pipe $CFLAGS" |
172 | build_target="linux" | 182 | build_target="linux" |
173 | LIBPREFIX= | 183 | DEFAULT_INTERFACE="\"eth0\"" |
174 | DLLDIR=lib | 184 | LIBPREFIX= |
175 | UNIXONLY="#" | 185 | DLLDIR=lib |
186 | UNIXONLY="#" | ||
176 | ], | 187 | ], |
177 | [gnu*],[ | 188 | [gnu*], |
178 | AC_DEFINE_UNQUOTED(GNU,1,[This is a GNU system]) | 189 | [AC_DEFINE([GNU],[1],[Define to 1 if this is a GNU system]) |
179 | build_target="gnu" | 190 | build_target="gnu" |
180 | UNIXONLY="#" | 191 | DEFAULT_INTERFACE="\"eth0\"" |
192 | UNIXONLY="#" | ||
181 | ], | 193 | ], |
182 | [ | 194 | [AC_DEFINE([OTHEROS],[1],[Define to 1 if this is some strange OS]) |
183 | AC_MSG_RESULT(Unrecognised OS $host_os) | 195 | DEFAULT_INTERFACE="\"eth0\"" |
184 | AC_DEFINE_UNQUOTED(OTHEROS,1,[Some strange OS]) | 196 | ]) |
185 | UNIXONLY="" | ||
186 | ]) | ||
187 | AC_DEFINE_UNQUOTED([GNUNET_DEFAULT_INTERFACE], $DEFAULT_INTERFACE, [This should be the default choice for the name of the first network interface]) | ||
188 | AC_SUBST(DEFAULT_INTERFACE) | ||
189 | 197 | ||
190 | # Disable TCP-based IPC on systems that support UNIX domain | 198 | AC_DEFINE_UNQUOTED([GNUNET_DEFAULT_INTERFACE], [$DEFAULT_INTERFACE], |
191 | # sockets in default configuration: | 199 | [The default choice for the name of the first network interface]) |
192 | AC_SUBST(UNIXONLY) | 200 | AC_SUBST([DEFAULT_INTERFACE]) |
193 | 201 | ||
202 | # Disable TCP-based IPC on system supporting UNIX domain sockets | ||
203 | AC_SUBST([UNIXONLY]) | ||
194 | 204 | ||
195 | AC_MSG_CHECKING([for build target]) | 205 | AC_MSG_CHECKING([for build target]) |
196 | AM_CONDITIONAL(DARWIN, test "$build_target" = "darwin") | 206 | AM_CONDITIONAL([DARWIN], [test "$build_target" = "darwin"]) |
197 | AM_CONDITIONAL(SOLARIS, test "$build_target" = "solaris") | 207 | AM_CONDITIONAL([SOLARIS], [test "$build_target" = "solaris"]) |
198 | AM_CONDITIONAL(XNETBSD, test "$build_target" = "netbsd") | 208 | AM_CONDITIONAL([XNETBSD], [test "$build_target" = "netbsd"]) |
199 | AM_CONDITIONAL(XFREEBSD, test "$build_target" = "freebsd") | 209 | AM_CONDITIONAL([XFREEBSD], [test "$build_target" = "freebsd"]) |
200 | AM_CONDITIONAL(OPENBSD, test "$build_target" = "openbsd") | 210 | AM_CONDITIONAL([OPENBSD], [test "$build_target" = "openbsd"]) |
201 | # FIXME: We need a define BSD for some binaries like we | 211 | AM_CONDITIONAL([XBSD], [test "x$bsd" = "xyes"]) |
202 | # need define LINUX for some. This does not scale, how | 212 | AM_CONDITIONAL([LINUX], [test "$build_target" = "linux"]) |
203 | # can we solve this better? | 213 | AM_CONDITIONAL([GNU], [test "$build_target" = "gnu"]) |
204 | AM_CONDITIONAL(XBSD, test "$build_target" = "netbsd" -o "$build_target" = "freebsd" -o "$build_target" = "openbsd") | ||
205 | AM_CONDITIONAL(LINUX, test "$build_target" = "linux") | ||
206 | AM_CONDITIONAL(GNU, test "$build_target" = "gnu") | ||
207 | |||
208 | AC_MSG_RESULT([$build_target]) | 214 | AC_MSG_RESULT([$build_target]) |
209 | AC_SUBST(build_target) | ||
210 | AM_CONDITIONAL([am__fastdepOBJC], false) | ||
211 | AC_UNALIGNED_64_ACCESS | ||
212 | 215 | ||
213 | # some other checks for standard libs | 216 | AS_IF([test "$build_target" = "darwin"], |
214 | AC_SEARCH_LIBS([gethostbyname], [nsl ws2_32]) | 217 | [AC_MSG_WARN([The VPN application cannot be compiled on your system])]) |
215 | AC_SEARCH_LIBS([memrchr], [], | ||
216 | AC_DEFINE(HAVE_MEMRCHR,1,[memrchr supported]), []) | ||
217 | AC_SEARCH_LIBS([memset_s], [], | ||
218 | AC_DEFINE(HAVE_MEMSET_S,1,[memset_s supported]), []) | ||
219 | AC_SEARCH_LIBS([explicit_bzero], [], | ||
220 | AC_DEFINE(HAVE_EXPLICIT_BZERO,1,[explicit_bzero supported]), []) | ||
221 | AC_CHECK_LIB(socket, socket) | ||
222 | AC_CHECK_LIB(m, log) | ||
223 | AC_CHECK_LIB(c, getloadavg, AC_DEFINE(HAVE_GETLOADAVG,1,[getloadavg supported])) | ||
224 | |||
225 | AC_CHECK_PROG(VAR_GETOPT_BINARY, getopt, true, false) | ||
226 | AM_CONDITIONAL(HAVE_GETOPT_BINARY, $VAR_GETOPT_BINARY) | ||
227 | |||
228 | AC_CHECK_PROGS(PKG_CONFIG, [pkgconf, pkg-config], false) | ||
229 | AM_CONDITIONAL(HAVE_PKG_CONFIG, test x$PKG_CONFIG != xfalse) | ||
230 | |||
231 | AC_CHECK_PROG(VAR_SSH_BINARY, ssh, true, false) | ||
232 | AM_CONDITIONAL(HAVE_SSH_BINARY, $VAR_SSH_BINARY) | ||
233 | AC_MSG_CHECKING(for SSH key) | ||
234 | AM_CONDITIONAL(HAVE_SSH_KEY, ssh -D 12345 -o "BatchMode yes" -o "UserKnownHostsFile /tmp/gnunet_test_cosks_ssh_garbage" -o "StrictHostKeyChecking no" 127.0.0.1 echo -n) | ||
235 | if test -f /tmp/gnunet_test_cosks_ssh_garbage; then | ||
236 | rm -f /tmp/gnunet_test_cosks_ssh_garbage | ||
237 | fi | ||
238 | |||
239 | |||
240 | # autotools' m4 for python has no maximum version! | ||
241 | # python3.4 - python3.8 for tests (3.8 unchecked) | ||
242 | # TODO: document how to override the lowest version | ||
243 | # TODO: found by this. | ||
244 | m4_define_default([_AM_PYTHON_INTERPRETER_LIST],[python3 python3.4 python3.5 python3.6 python3.7 python3.8 python]) | ||
245 | AM_PATH_PYTHON([3.4],, [:]) | ||
246 | AC_SUBST([PYTHON]) | ||
247 | AM_CONDITIONAL([HAVE_PYTHON], [test "$PYTHON" != :]) | ||
248 | 218 | ||
219 | AC_SUBST([build_target]) | ||
249 | 220 | ||
250 | # perl | 221 | # Other checks for standard libraries |
251 | AC_PATH_PROG( PERL, perl, , | 222 | AC_SEARCH_LIBS([gethostbyname], [nsl ws2_32]) |
252 | $PATH:/usr/local/bin/perl:/usr/bin/:/usr/local/bin ) | 223 | AC_SEARCH_LIBS([memchr],[], |
224 | [AC_DEFINE([HAVE_MEMCHR],[1], | ||
225 | [Define to 1 if memchr is supported])], | ||
226 | []) | ||
227 | AC_SEARCH_LIBS([memset_s],[], | ||
228 | [AC_DEFINE([HAVE_MEMSET_S],[1], | ||
229 | [Define to 1 if memset_s is supported])], | ||
230 | []) | ||
231 | AC_SEARCH_LIBS([explicit_bzero],[], | ||
232 | [AC_DEFINE([HAVE_EXPLICIT_BZERO],[1], | ||
233 | [Define to 1 if explicit_bzero is supported])], | ||
234 | []) | ||
235 | |||
236 | AC_CHECK_LIB([socket], [socket]) | ||
237 | AC_CHECK_LIB([m], [log]) | ||
238 | AC_CHECK_FUNCS([getloadavg]) | ||
239 | |||
240 | AC_CHECK_PROG([GETOPT_BINARY], [getopt], [true], [false]) | ||
241 | AM_CONDITIONAL([HAVE_GETOPT_BINARY], [$GETOPT_BINARY]) | ||
242 | |||
243 | AC_CHECK_PROGS([PKG_CONFIG], [pkgconf pkg-config], [false]) | ||
244 | AM_CONDITIONAL([HAVE_PKG_CONFIG], [test "x$PKG_CONFIG" != "xfalse"]) | ||
245 | |||
246 | AC_CHECK_PROG([SSH_BINARY], [ssh], [true], [false]) | ||
247 | AM_CONDITIONAL([HAVE_SSH_BINARY], [$SSH_BINARY]) | ||
248 | |||
249 | AC_MSG_CHECKING([for SSH key]) | ||
250 | AS_IF([ssh -D 12345 -o "BatchMode Yes" -o "UserKnownHostsFile /tmp/gnunet_test_cosks_ssh_garbage" -o "StrictHostKeyChecking no" 127.0.0.1 echo -n 2>/dev/null], | ||
251 | [has_ssh_key=yes], | ||
252 | [has_ssh_key=no]) | ||
253 | AM_CONDITIONAL([HAVE_SSH_KEY], [test "x$has_ssh_key" = "xyes"]) | ||
254 | AC_MSG_RESULT([$has_ssh_key]) | ||
255 | |||
256 | AS_IF([test -f /tmp/gnunet_test_cosks_ssh_garbage], | ||
257 | [rm -f /tmp/gnunet_test_cosks_ssh_garbage]) | ||
258 | |||
259 | AM_PATH_PYTHON([3.4],,[:]) | ||
260 | AC_SUBST([PYTHON]) | ||
261 | AM_CONDITIONAL([HAVE_PYTHON], [test "$PYTHON" != ':']) | ||
262 | |||
263 | AC_ARG_WITH([perl], | ||
264 | [AS_HELP_STRING([--with-perl=PATH], [Look for Perl in PATH])], | ||
265 | [AS_CASE([$withval], | ||
266 | [no], [AC_MSG_ERROR([Perl is required])], | ||
267 | [yes], [AC_PATH_PROG([PERL], [perl])], | ||
268 | [AC_PATH_PROG([PERL], [perl], [], ["$withval"])])], | ||
269 | [AC_PATH_PROG([PERL], [perl])]) | ||
253 | AC_SUBST([PERL]) | 270 | AC_SUBST([PERL]) |
254 | AM_CONDITIONAL([HAVE_PERL], [test -x "$PERL"]) | 271 | AM_CONDITIONAL([HAVE_PERL], [test -x "$PERL"]) |
255 | AS_IF([test -x "$PERL"], | 272 | AS_IF([test -x "$PERL"], |
256 | [AC_DEFINE_UNQUOTED([HAVE_PERL], [1], [Path to Perl])], | 273 | [AC_DEFINE([HAVE_PERL], [1], [Define to 1 if perl is available])], |
257 | [AC_DEFINE_UNQUOTED([HAVE_PERL], [0], [Path to Perl])]) | 274 | [AC_DEFINE([HAVE_PERL], [0], [Define to 1 if perl is available])]) |
258 | 275 | ||
259 | # awk | 276 | AWK_BINARY="$AWK" |
260 | AC_PATH_PROGS( AWK_BINARY, [awk gawk], ,$PATH:/usr/bin/:/usr/local/bin ) | ||
261 | AC_SUBST([AWK_BINARY]) | 277 | AC_SUBST([AWK_BINARY]) |
262 | AM_CONDITIONAL([HAVE_AWK], [test -x "$AWK_BINARY"]) | 278 | AM_CONDITIONAL([HAVE_AWK], [test -x "$AWK_BINARY"]) |
263 | AS_IF([test -x "$AWK_BINARY"], | 279 | AS_IF([test -x "$AWK_BINARY"], |
264 | [AC_DEFINE_UNQUOTED([HAVE_AWK], [1], [Path to awk])], | 280 | [AC_DEFINE([HAVE_AWK], [1], [Define to 1 if awk is available])], |
265 | [AC_DEFINE_UNQUOTED([HAVE_AWK], [0], [Path to awk])]) | 281 | [AC_DEFINE([HAVE_AWK], [0], [Define to 1 if awk is available])]) |
282 | |||
283 | # check for some LaTeX packages used by gnunet-bcd | ||
284 | CHECK_LATEX_PACKAGE([TikZ], [tikz]) | ||
285 | CHECK_LATEX_PACKAGE([QR Code], [qrcode]) | ||
286 | CHECK_LATEX_PACKAGE([Labels], [labels]) | ||
287 | AM_CONDITIONAL([HAVE_PDFLATEX], [test "x$PDFLATEX_BINARY" != "xno"]) | ||
266 | 288 | ||
267 | # should we install gnunet-logread? | ||
268 | AC_MSG_CHECKING(whether to install gnunet-logread) | ||
269 | AC_ARG_WITH([gnunet-logread], | 289 | AC_ARG_WITH([gnunet-logread], |
270 | [AS_HELP_STRING([--with-gnunet-logread], | 290 | [AS_HELP_STRING([--with-gnunet-logread], [Install gnunet-logread])], |
271 | [Install gnunet-logread])], | 291 | [logread=yes], |
272 | [logread=${withval}], | 292 | [logread=no]) |
273 | [logread=no]) | ||
274 | AC_MSG_RESULT($logread) | ||
275 | AS_IF([test "x$logread" = "xyes"], | 293 | AS_IF([test "x$logread" = "xyes"], |
276 | [AM_CONDITIONAL([GNUNET_LOGREAD], true) | 294 | [AM_CONDITIONAL([GNUNET_LOGREAD], [true]) |
277 | AC_DEFINE([GNUNET_LOGREAD], | 295 | AC_DEFINE([GNUNET_LOGREAD], [1], |
278 | [1], | 296 | [Define to 1 if gnunet-logread is available])], |
279 | [Installing gnunet-logread])], | 297 | [AM_CONDITIONAL([GNUNET_LOGREAD], [false]) |
280 | [AM_CONDITIONAL([GNUNET_LOGREAD], | 298 | AC_DEFINE([GNUNET_LOGREAD], [0], |
281 | false) | 299 | [Define to 1 if gnunet-logread is available])]) |
282 | AC_DEFINE([GNUNET_LOGREAD], | ||
283 | [0], | ||
284 | [Not installing gnunet-logread])]) | ||
285 | 300 | ||
286 | # iptables is a soft requirement to run tests | 301 | # iptables is a soft requirement to run tests |
287 | AC_PATH_TARGET_TOOL(VAR_IPTABLES_BINARY, iptables, false) | 302 | AC_PATH_TARGET_TOOL([IPTABLES_BINARY], [iptables], [false]) |
288 | 303 | AS_IF([test "x$IPTABLES_BINARY" = "xfalse"], | |
289 | AS_IF([test x"$VAR_IPTABLES_BINARY" = x"false"], | 304 | [AS_IF([test -x "/sbin/iptables"], |
290 | [AS_IF([test -x "/sbin/iptables"], | 305 | [IPTABLES_BINARY="/sbin/iptables"], |
291 | [VAR_IPTABLES_BINARY="/sbin/iptables"], | 306 | [AS_IF([test -x "/usr/sbin/iptables"], |
292 | [AS_IF([test -x "/usr/sbin/iptables"], | 307 | [IPTABLES_BINARY="/usr/sbin/iptables"])])]) |
293 | [VAR_IPTABLES_BINARY="/usr/sbin/iptables"])])]) | 308 | |
294 | 309 | AS_IF([test "x$IPTABLES_BINARY" != "xfalse"], | |
295 | AS_IF([test x"$VAR_IPTABLES_BINARY" != x"false"], | 310 | [AC_DEFINE_UNQUOTED([IPTABLES], ["$IPTABLES_BINARY"], [Path to iptables])], |
296 | [AC_DEFINE_UNQUOTED([IPTABLES], "$VAR_IPTABLES_BINARY", [Path to iptables])], | 311 | [AC_MSG_WARN([iptables not found])]) |
297 | [AC_MSG_WARN([warning: 'iptables' not found.])]) | 312 | |
298 | 313 | # also check for ip6tables | |
299 | # ip6tables is a soft requirement for some features | 314 | AC_PATH_TARGET_TOOL([IP6TABLES_BINARY], [ip6tables], [false]) |
300 | AC_PATH_TARGET_TOOL(VAR_IP6TABLES_BINARY, ip6tables, false) | 315 | AS_IF([test "x$IP6TABLES_BINARY" = "xfalse"], |
301 | 316 | [AS_IF([test -x "/sbin/ip6tables"], | |
302 | AS_IF([test x"$VAR_IP6TABLES_BINARY" = x"false"], | 317 | [IP6TABLES_BINARY="/sbin/ip6tables"], |
303 | [AS_IF([test -x "/sbin/ip6tables"], | 318 | [AS_IF([test -x "/usr/sbin/ip6tables"], |
304 | [VAR_IP6TABLES_BINARY="/sbin/ip6tables"], | 319 | [IP6TABLES_BINARY="/usr/sbin/ip6tables"])])]) |
305 | [AS_IF([test -x "/usr/sbin/ip6tables"], | 320 | |
306 | [VAR_IP6TABLES_BINARY="/usr/sbin/ip6tables"])])]) | 321 | AS_IF([test "x$IP6TABLES_BINARY" != "xfalse"], |
307 | 322 | [AC_DEFINE_UNQUOTED([IP6TABLES], ["$IP6TABLES_BINARY"], | |
308 | 323 | [Path to ip6tables])], | |
309 | AS_IF([test x"$VAR_IP6TABLES_BINARY" != x"false"], | 324 | [AC_MSG_WARN([ip6tables not found])]) |
310 | [AC_DEFINE_UNQUOTED([IP6TABLES], "$VAR_IP6TABLES_BINARY", [Path to ip6tables])], | 325 | |
311 | [AC_MSG_WARN([warning: 'ip6tables' not found.])]) | 326 | # also check for ip |
312 | 327 | AC_PATH_TARGET_TOOL([IP_BINARY], [ip], [false]) | |
313 | # ip is a soft requirement for some features | 328 | AS_IF([test "x$IP_BINARY" = "xfalse"], |
314 | AC_PATH_TARGET_TOOL(VAR_IP_BINARY, ip, false) | 329 | [AS_IF([test -x "/sbin/ip"], |
315 | 330 | [IP_BINARY="/sbin/ip"], | |
316 | AS_IF([test x"$VAR_IP_BINARY" = x"false"], | 331 | [AS_IF([test -x "/usr/sbin/ip"], |
317 | [AS_IF([test -x "/sbin/ip"], | 332 | [IP_BINARY="/usr/sbin/ip"])])]) |
318 | [VAR_IP_BINARY="/sbin/ip"], | 333 | |
319 | [AS_IF([test -x "/usr/sbin/ip"], | 334 | AS_IF([test "x$IP_BINARY" != "xfalse"], |
320 | [VAR_IP_BINARY="/usr/sbin/ip"])])]) | 335 | [AC_DEFINE_UNQUOTED([PATH_TO_IP], ["$IP_BINARY"], [Path to ip])], |
321 | 336 | [AC_MSG_WARN([ip not found])]) | |
322 | AS_IF([test x"$VAR_IP_BINARY" != x"false"], | 337 | |
323 | [AC_DEFINE_UNQUOTED([PATH_TO_IP], "$VAR_IP_BINARY", [Path to ip])], | 338 | # locate ifconfig |
324 | [AC_MSG_WARN([warning: 'ip' not found.])]) | 339 | AC_PATH_TARGET_TOOL([IFCONFIG_BINARY], [ifconfig], [false]) |
325 | 340 | AS_IF([test "x$IFCONFIG_BINARY" = "xfalse"], | |
326 | # locate 'ifconfig' | 341 | [AS_IF([test -x "/sbin/ifconfig"], |
327 | AC_PATH_TARGET_TOOL(VAR_IFCONFIG_BINARY, ifconfig, false) | 342 | [IFCONFIG_BINARY="/sbin/ifconfig"], |
328 | 343 | [AS_IF([test -x "/usr/sbin/ifconfig"], | |
329 | AC_CHECK_PROG(VAR_IFCONFIG_BINARY, ifconfig, true, false) | 344 | [IFCONFIG_BINARY="/usr/sbin/ifconfig"])])]) |
330 | AS_IF([test x"$VAR_IFCONFIG_BINARY" = x"false"], | 345 | |
331 | [AS_IF([test -x "/sbin/ifconfig"], | 346 | AS_IF([test "x$IFCONFIG_BINARY" != "xfalse"], |
332 | [VAR_IFCONFIG_BINARY="/sbin/ifconfig"], | 347 | [AC_DEFINE_UNQUOTED([IFCONFIG], ["$IFCONFIG_BINARY"], [Path to ifconfig])], |
333 | [AS_IF([test -x "/usr/sbin/ifconfig"], | 348 | [AC_MSG_WARN([ifconfig not found])]) |
334 | [VAR_IFCONFIG_BINARY="/usr/sbin/ifconfig"])])]) | 349 | |
335 | 350 | AC_PATH_PROG([MSG_USER_SETUP], [adduser], [false]) | |
336 | AS_IF([test x"$VAR_IFCONFIG_BINARY" != x"false"], | 351 | |
337 | [AC_DEFINE_UNQUOTED([IFCONFIG], "$VAR_IFCONFIG_BINARY", [Path to ifconfig])], | 352 | # test if the 'gnunet' user and groups exist |
338 | [AC_MSG_WARN(['ifconfig' not found.])]) | ||
339 | |||
340 | |||
341 | # Test if 'adduser' binary exists | ||
342 | MSG_USER_SETUP=true | ||
343 | AC_PATH_PROG([MSG_USER_SETUP], | ||
344 | [adduser], | ||
345 | false, | ||
346 | [path=$PATH$PATH_SEPARATOR/usr/sbin$PATH_SEPARATOR/sbin]) | ||
347 | |||
348 | # Test if 'gnunet' user and the groups exist | ||
349 | getent passwd gnunet > /dev/null | 353 | getent passwd gnunet > /dev/null |
350 | HAVE_GNUNET_USER=$? | 354 | HAVE_GNUNET_USER=$? |
351 | getent group gnunet > /dev/null | 355 | getent group gnunet > /dev/null |
@@ -355,979 +359,633 @@ getent group gnunetdns > /dev/null | |||
355 | AS_IF([test x$? != x0], | 359 | AS_IF([test x$? != x0], |
356 | [HAVE_GNUNET_USER=1]) | 360 | [HAVE_GNUNET_USER=1]) |
357 | 361 | ||
358 | AC_PATH_TARGET_TOOL(VAR_SYSCTL_BINARY, sysctl, false) | 362 | AC_PATH_TARGET_TOOL([SYSCTL_BINARY], [sysctl], [false]) |
359 | 363 | AS_IF([test "x$SYSCTL_BINARY" = "xfalse"], | |
360 | AC_CHECK_PROG(VAR_SYSCTL_BINARY, sysctl, true, false) | ||
361 | AS_IF([test x"$VAR_SYSCTL_BINARY" = x"false"], | ||
362 | [AS_IF([test -x "/sbin/sysctl"], | 364 | [AS_IF([test -x "/sbin/sysctl"], |
363 | [VAR_SYSCTL_BINARY="/sbin/sysctl"], | 365 | [SYSCTL_BINARY="/sbin/sysctl"], |
364 | [AS_IF([test -x "/usr/sbin/sysctl"], | 366 | [AS_IF([test -x "/usr/sbin/sysctl"], |
365 | [VAR_SYSCTL_BINARY="/usr/sbin/sysctl"])])]) | 367 | [SYSCTL_BINARY="/usr/sbin/sysctl"])])]) |
366 | AS_IF([test x"$VAR_SYSCTL_BINARY" != x"false"], | ||
367 | [AC_DEFINE_UNQUOTED([SYSCTL], "$VAR_SYSCTL_BINARY", [Path to sysctl])], | ||
368 | [AC_MSG_WARN(['sysctl' not found.])]) | ||
369 | 368 | ||
370 | # miniupnpc / upnpc binary is a soft runtime requirement | 369 | AS_IF([test "x$SYSCTL_BINARY" != "xfalse"], |
371 | AC_PATH_TARGET_TOOL(VAR_UPNPC_BINARY, upnpc, false) | 370 | [AC_DEFINE_UNQUOTED([SYSCTL], ["$SYSCTL_BINARY"], [Path to sysctl])], |
371 | [AC_MSG_WARN([sysctl not found])]) | ||
372 | 372 | ||
373 | AS_IF([test x"$VAR_UPNPC_BINARY" != x"false"], | 373 | # (mini)upnpc is a soft runtime requirement |
374 | [AC_DEFINE_UNQUOTED([UPNPC], "$VAR_UPNPC_BINARY", [Path to upnpc binary])], | 374 | AC_PATH_TARGET_TOOL([UPNPC_BINARY], [upnpc], [false]) |
375 | [AC_MSG_WARN([warning: 'upnpc' binary not found.])]) | 375 | AS_IF([test "x$UPNPC_BINARY" != "x$false"], |
376 | [AC_DEFINE_UNQUOTED([UPNPC], ["$UPNPC_BINARY"], [Path to upnpc binary])], | ||
377 | [AC_MSG_WARN([upnpc binary not found])]) | ||
376 | 378 | ||
379 | # the following tools might use a flag to specify their path or non-default | ||
380 | # name (e.g. a versioned string instead of simply the program name) | ||
377 | 381 | ||
378 | # checkbashisms | 382 | # checkbashisms |
379 | AC_CHECK_PROGS(CHECKBASHISMS_BINARY, [checkbashisms checkbashisms.pl], false) | 383 | AC_CHECK_PROGS([CHECKBASHISMS_BINARY], [checkbashisms checkbashisms.pl], [false]) |
380 | AM_CONDITIONAL(HAVE_CHECKBASHISMS, test x$CHECKBASHISMS_BINARY != xfalse) | 384 | AM_CONDITIONAL([HAVE_CHECKBASHISMS], [test "x$CHECKBASHISMS_BINARY" != "xfalse"]) |
381 | 385 | ||
382 | # uncrustify | 386 | # uncrustify |
383 | # TODO: maybe add flag to pass location | 387 | AC_CHECK_PROG([UNCRUSTIFY_BINARY], [uncrustify], [true], [false]) |
384 | AC_CHECK_PROG(UNCRUSTIFY_BINARY, uncrustify, true) | 388 | AM_CONDITIONAL([HAVE_UNCRUSTIFY_BINARY], [$UNCRUSTIFY_BINARY]) |
385 | AM_CONDITIONAL(HAVE_UNCRUSTIFY_BINARY, $UNCRUSTIFY_BINARY) | ||
386 | 389 | ||
387 | # yapf | 390 | # yapf |
388 | # TODO: less repetition, add flag to pass name | 391 | # check only the 'yapf' name for now |
389 | AC_CHECK_PROGS(YAPF_BINARY, [yapf yapf3.0 yapf3.1 yapf3.2 yapf3.3 yapf3.4 yapf3.5 yapf3.6 yapf3.7 yapf3.8 yapf3.9 yapf4.0], false) | 392 | AC_CHECK_PROGS([YAPF_BINARY], [yapf], [false]) |
390 | AM_CONDITIONAL(HAVE_YAPF_BINARY, test x$YAPF_BINARY != xfalse) | 393 | AM_CONDITIONAL([HAVE_YAPF_BINARY], [test "x$YAPF_BINARY" != "xfalse"]) |
391 | |||
392 | 394 | ||
393 | AC_CHECK_MEMBER(struct tm.tm_gmtoff, | 395 | AC_CHECK_MEMBER([struct tm.tm_gmtoff], |
394 | [AC_DEFINE(HAVE_TM_GMTOFF, 1, | 396 | [AC_DEFINE([HAVE_TM_GMTOFF], [1], |
395 | [Define if struct tm has the tm_gmtoff member.])], | 397 | [Define to 1 if struct tm has the tm_gmtoff member])], |
396 | , | 398 | [], |
397 | [#include <time.h>]) | 399 | [#include <time.h>]) |
398 | 400 | ||
399 | # 'save' libs; only those libs found so far will be | 401 | # "save" libs; only those libs found so far will be |
400 | # linked against _everywhere_. For the others, we | 402 | # linked against _everywhere_. For the others, we |
401 | # will be more selective! | 403 | # will be more selective! |
402 | SAVE_LIBS=$LIBS | 404 | SAVE_LIBS=$LIBS |
403 | 405 | ||
404 | have_addrinfo_a=0 | 406 | have_addrinfo_a=0 |
405 | AC_CHECK_LIB(anl, | 407 | AC_CHECK_LIB([anl], [getaddrinfo_a], |
406 | getaddrinfo_a, | 408 | [have_addrinfo_a=1 |
407 | [have_addrinfo_a=1 AC_DEFINE(HAVE_GETADDRINFO_A, | 409 | AC_DEFINE([HAVE_GETADDRINFO_A], [1], |
408 | 1, | 410 | [Define to 1 if getaddrinfo_a is supported])]) |
409 | [getaddrinfo_a supported])]) | 411 | AM_CONDITIONAL([HAVE_GETADDRINFO_A], [test "x$have_addrinfo_a" = "x1"]) |
410 | AM_CONDITIONAL(HAVE_GETADDRINFO_A, | ||
411 | [test "$have_addrinfo_a" = 1]) | ||
412 | 412 | ||
413 | # libgcrypt | 413 | # libgcrypt |
414 | gcrypt=0 | 414 | gcrypt=0 |
415 | NEED_LIBGCRYPT_API=1 | 415 | gcrypt_api=1 |
416 | NEED_LIBGCRYPT_VERSION=1.6.0 | 416 | gcrypt_version=1.6.0 |
417 | 417 | AM_PATH_LIBGCRYPT(["$gcrypt_api:$gcrypt_version"], [gcrypt=1]) | |
418 | AM_PATH_LIBGCRYPT("$NEED_LIBGCRYPT_API:$NEED_LIBGCRYPT_VERSION", gcrypt=1) | ||
419 | AC_CHECK_DECLS([gcry_mpi_set_opaque_copy], [], [], [[#include <gcrypt.h>]]) | 418 | AC_CHECK_DECLS([gcry_mpi_set_opaque_copy], [], [], [[#include <gcrypt.h>]]) |
420 | 419 | ||
421 | AS_IF([test $gcrypt = 0], | 420 | AS_IF([test "$gcrypt" = "0"], |
422 | [ | 421 | [AC_MSG_ERROR([[You need libgcrypt to build this program. |
423 | AC_MSG_ERROR([[ | 422 | At least version $gcrypt_version (API $gcrypt_api) is required.]])]) |
424 | *** | ||
425 | *** You need libgcrypt to build this program. | ||
426 | *** This library is for example available at | ||
427 | *** ftp://ftp.gnupg.org/gcrypt/libgcrypt/. | ||
428 | *** At least version $NEED_LIBGCRYPT_VERSION (API $NEED_LIBGCRYPT_API) | ||
429 | *** is required. | ||
430 | ***]]) | ||
431 | ]) | ||
432 | AC_DEFINE_UNQUOTED([NEED_LIBGCRYPT_VERSION], "$NEED_LIBGCRYPT_VERSION", [required libgcrypt version]) | ||
433 | 423 | ||
434 | AC_CHECK_DECLS([struct in6_ifreq], [], [], [[#include <linux/if_tun.h>]]) | 424 | AC_DEFINE_UNQUOTED([NEED_LIBGCRYPT_VERSION], ["$gcrypt_version"], |
425 | [Required libgcrypt version]) | ||
435 | 426 | ||
436 | AC_CHECK_HEADER([if_tun.h], | 427 | AC_CHECK_HEADER([if_tun.h], |
437 | [AC_DEFINE([IF_TUN_HDR], ["if_tun.h"], [if_tun.h include path])], | 428 | [AC_DEFINE([IF_TUN_HDR], ["if_tun.h"], |
438 | [AC_CHECK_HEADER([linux/if_tun.h], | 429 | [How to include if_tun.h]) |
439 | [AC_DEFINE([IF_TUN_HDR], ["linux/if_tun.h"])], | 430 | AC_CHECK_DECLS([struct in6_ifreq], [], [], |
440 | [AC_CHECK_HEADER([net/if_tun.h], | 431 | [[#include <if_tun.h>]])], |
441 | [AC_DEFINE([IF_TUN_HDR], ["net/if_tun.h"])], | 432 | [AC_CHECK_HEADER([linux/if_tun.h], |
442 | [AC_CHECK_HEADER([net/tun/if_tun.h], | 433 | [AC_DEFINE([IF_TUN_HDR], ["linux/if_tun.h"], |
443 | [AC_DEFINE([IF_TUN_HDR], ["net/tun/if_tun.h"])])])])]) | 434 | [How to include if_tun.h]) |
444 | 435 | AC_CHECK_DECLS([struct in6_ifreq], [], [], | |
445 | 436 | [[#include <linux/if_tun.h>]])], | |
446 | # should the build process be building the documentation? | 437 | [AC_CHECK_HEADER([net/if_tun.h], |
447 | AC_MSG_CHECKING(whether to build documentation) | 438 | [AC_DEFINE([IF_TUN_HDR], ["net/if_tun.h"], |
439 | [How to include if_tun.h]) | ||
440 | AC_CHECK_DECLS([struct in6_ifreq], [], [], | ||
441 | [[#include <net/if_tun.h>]])], | ||
442 | [AC_CHECK_HEADER([net/tun/if_tun.h], | ||
443 | [AC_DEFINE([IF_TUN_HDR], ["net/tun/if_tun.h"], | ||
444 | [How to include if_tun.h]) | ||
445 | AC_CHECK_DECLS([struct in6_ifreq], [], [], | ||
446 | [[#include <net/tun/if_tun.h>]])])])])]) | ||
447 | |||
448 | # Should documentation be built? | ||
448 | AC_ARG_ENABLE([documentation], | 449 | AC_ARG_ENABLE([documentation], |
449 | [AS_HELP_STRING([--disable-documentation], | 450 | [AS_HELP_STRING([--disable-documentation], |
450 | [do not build the documentation])], | 451 | [do not build the documentation])], |
451 | [documentation=${enableval}], | 452 | [documentation=${enableval}], |
452 | [documentation=yes]) | 453 | [documentation=yes]) |
453 | AC_MSG_RESULT($documentation) | 454 | |
454 | AS_IF([test "x$documentation" = "xyes"], | 455 | AC_CHECK_PROG([DOXY_BINARY], [doxygen], [true], [false]) |
455 | [AM_CONDITIONAL([DOCUMENTATION], | 456 | AM_CONDITIONAL([HAVE_DOXY_BINARY], [$DOXY_BINARY]) |
456 | true) | 457 | |
457 | AC_DEFINE([DOCUMENTATION], | 458 | AM_CONDITIONAL([DOCUMENTATION], [test "x$documentation" = "xyes"]) |
458 | [1], | 459 | |
459 | [Building the documentation])], | 460 | AC_CHECK_PROGS([MANDOC_BINARY], [mandoc], [false]) |
460 | [AM_CONDITIONAL([DOCUMENTATION], | 461 | AM_CONDITIONAL([HAVE_MANDOC], [test "x$MANDOC_BINARY" != "xfalse"]) |
461 | false) | 462 | |
462 | AC_DEFINE([DOCUMENTATION], | 463 | # check if only the documentation should be build |
463 | [0], | ||
464 | [Not building the documentation])]) | ||
465 | |||
466 | # COMMENT: Check whether to transpile texinfo to mdoc. | ||
467 | # COMMENT: This is TRUE when --enable-texi2mdoc-generation | ||
468 | # COMMENT: but ERRORS when texi2mdoc binary is missing in your $PATH | ||
469 | # COMMENT: and makes the configure fail if it is missing. | ||
470 | # COMMENT: Consequential the DEFINE and CONDITIONAL are set to true. | ||
471 | # COMMENT: This is FALSE when --disable-texi2mdoc-generation was set | ||
472 | # COMMENT: or nothing was set (this is the default). | ||
473 | # COMMENT: There are 2 nested AS_IFs because we need to catch the | ||
474 | # COMMENT: potential non-existence of the texi2mdoc binary. | ||
475 | # COMMENT: Default return value / setting: no | ||
476 | AC_MSG_CHECKING(whether to include generated texi2mdoc output in installation) | ||
477 | AC_ARG_ENABLE([texi2mdoc-generation], | ||
478 | [AS_HELP_STRING([--enable-texi2mdoc-generation], | ||
479 | [include generated texi2mdoc output in installation])], | ||
480 | [texi2mdoc_generation=${enableval}], | ||
481 | [texi2mdoc_generation=no]) | ||
482 | AC_MSG_RESULT($texi2mdoc_generation) | ||
483 | AS_IF([test "x$texi2mdoc_generation" = "xyes"], | ||
484 | [AS_IF([test "$texi2mdoc" = 0], | ||
485 | [AC_MSG_WARN([ERROR: transpiled mdoc output requires texi2mdoc.]) | ||
486 | AC_MSG_WARN([ERROR: texi2mdoc can be obtained via your]) | ||
487 | AC_MSG_WARN([ERROR: Operating System package manager or from]) | ||
488 | AC_MSG_WARN([ERROR: https://mandoc.bsd.lv/texi2mdoc/])], | ||
489 | [AM_CONDITIONAL([TEXI2MDOC_GENERATION],true) | ||
490 | AC_DEFINE([TEXI2MDOC_GENERATION], | ||
491 | [1], | ||
492 | [Building section 7 mdoc output])])], | ||
493 | [AM_CONDITIONAL([TEXI2MDOC_GENERATION], | ||
494 | false) | ||
495 | AC_DEFINE([TEXI2MDOC_GENERATION], | ||
496 | [0], | ||
497 | [Not building section 7 mdoc output])]) | ||
498 | |||
499 | # test for texi2mdoc (the binary, not the script distributed | ||
500 | # with autogen) | ||
501 | # TODO: refactor this and the check above. | ||
502 | AC_MSG_CHECKING(for texi2mdoc binary) | ||
503 | AC_CHECK_PROGS(TEXI2MDOC_BINARY, [texi2mdoc], false) | ||
504 | AM_CONDITIONAL(HAVE_TEXI2MDOC, test x$TEXI2MDOC_BINARY != xfalse) | ||
505 | |||
506 | # texi2man is a tool which needs to be investigated and | ||
507 | # is probably incompatible to texi2mdoc in invocation. | ||
508 | # Detection at this point only serves as a reminder that | ||
509 | # I will work this into the build-system. | ||
510 | AC_MSG_CHECKING(for texi2man perl script) | ||
511 | AC_CHECK_PROGS(TEXI2MAN_SCRIPT, [texi2man], false) | ||
512 | AM_CONDITIONAL(HAVE_TEXI2MAN, test x$TEXI2MAN_SCRIPT != xfalse) | ||
513 | |||
514 | |||
515 | # test for mandoc | ||
516 | AC_MSG_CHECKING(for mandoc binary) | ||
517 | AC_CHECK_PROGS(MANDOC_BINARY, [mandoc], false) | ||
518 | AM_CONDITIONAL(HAVE_MANDOC, test x$MANDOC_BINARY != xfalse) | ||
519 | |||
520 | # should the build process be building only the documentation? | ||
521 | AC_MSG_CHECKING(whether to build only documentation) | ||
522 | AC_ARG_ENABLE([documentation-only], | 464 | AC_ARG_ENABLE([documentation-only], |
523 | [AS_HELP_STRING([--enable-documentation-only], | 465 | [AS_HELP_STRING([--enable-documentation-only], |
524 | [build only the documentation])], | 466 | [build only the documentation])], |
525 | [documentation_only=${enableval}], | 467 | [AS_IF([test "x${enableval}" = "xno"], |
526 | [documentation_only=no]) | 468 | [documentation_only="0"], |
527 | AC_MSG_RESULT($documentation_only) | 469 | [documentation_only="1"])], |
528 | AS_IF([test "x$documentation_only" = "xyes"], | 470 | [documentation_only="0"]) |
529 | [ | 471 | AC_DEFINE_UNQUOTED([DOCUMENTATION_ONLY], [$documentation_only], |
530 | AM_CONDITIONAL([DOCUMENTATION_ONLY],true) | 472 | [Define to 1 if only documentation is being built]) |
531 | AC_DEFINE([DOCUMENTATION_ONLY],[1],[Building only the documentation]) | 473 | AM_CONDITIONAL([DOCUMENTATION_ONLY], [test "x$documentation_only" = "x1"]) |
532 | ],[ | 474 | |
533 | AM_CONDITIONAL([DOCUMENTATION_ONLY],false) | 475 | # check if man pages should be included |
534 | AC_DEFINE([DOCUMENTATION_ONLY],[0],[Doing a normal build, more than only documentation]) | ||
535 | ]) | ||
536 | |||
537 | # should the build process be including the manpages? (default: yes) | ||
538 | AC_MSG_CHECKING(whether to include man pages) | ||
539 | AC_ARG_ENABLE([include-manpages], | 476 | AC_ARG_ENABLE([include-manpages], |
540 | [AS_HELP_STRING([--disable-include-manpages], | 477 | [AS_HELP_STRING([--disable-include-manpages], |
541 | [Do not include the man pages in build and installation])], | 478 | [do not include man pages during installation])], |
542 | [include_manpages=${enableval}], | 479 | [AS_IF([test "x${enableval}" = "xno"], |
543 | [include_manpages=yes]) | 480 | [include_man="0"], |
544 | AC_MSG_RESULT($include_manpages) | 481 | [include_man="1"])], |
545 | AS_IF([test "x$include_manpages" = "xyes"], | 482 | [include_man="1"]) |
546 | [ | 483 | AC_DEFINE_UNQUOTED([INCLUDE_MANPAGES], [$include_man], |
547 | AM_CONDITIONAL([INCLUDE_MANPAGES],true) | 484 | [Define to 1 if man pages are included]) |
548 | AC_DEFINE([INCLUDE_MANPAGES],[1],[Including the man pages in the build and installation]) | 485 | AM_CONDITIONAL([INCLUDE_MANPAGES], [test "x$include_man" = "x1"]) |
549 | ],[ | 486 | |
550 | AM_CONDITIONAL([INCLUDE_MANPAGES],false) | 487 | # Hardening options |
551 | AC_DEFINE([INCLUDE_MANPAGES],[0],[Not including the man pages in the build and installation]) | ||
552 | ]) | ||
553 | |||
554 | # Do we have texinfo4? If yes, it is used to set texinfo4 specific switches | ||
555 | # (not syntax!) to the commandline tools which generate the html. If not, | ||
556 | # texinfo5 switches are used. This comes with no version checks, is | ||
557 | # enabled only at distributors action (ie defaults to "no"). | ||
558 | # Mantis #3914 for more details (https://bugs.gnunet.org/view.php?id=3914) | ||
559 | # While GNU makeinfo 6.5 supports --css-ref=URL, | ||
560 | # makeinfo 4.8 (in NetBSD 8.0, macOS, and maybe other | ||
561 | # base) does only support --css-include=FILE. | ||
562 | # The only difference is a shorter html output and | ||
563 | # in 6.5 the ability to use refs instead of include. | ||
564 | # We prefer not to break builds in this case, so | ||
565 | # we use the include version which is backwards compatible | ||
566 | # and upwards compatible, while the ref variant is neither. | ||
567 | # In the 5.x version they added `--split=chapters|sections` in | ||
568 | # addition to `--split=nodes`. | ||
569 | # Hold on to your hats: In version 6.5 this is already removed, ffs. | ||
570 | # GNU Texinfo, please be more consistent than 1 version in switches. | ||
571 | AC_MSG_CHECKING(whether to enable texinfo4 switches) | ||
572 | AC_ARG_ENABLE([texinfo4], | ||
573 | [AS_HELP_STRING([--enable-texinfo4], [Use texinfo version 4 specific switches])], | ||
574 | [activate_texinfo4=${enableval}], | ||
575 | [activate_texinfo4=no]) | ||
576 | AC_MSG_RESULT($activate_texinfo4) | ||
577 | AS_IF([test "x$activate_texinfo4" = "xyes"], | ||
578 | [ | ||
579 | AM_CONDITIONAL([ACTIVATE_TEXINFO4],true) | ||
580 | AC_DEFINE([ACTIVATE_TEXINFO4],[1],[Using texinfo version 4 specific switches]) | ||
581 | TEXINFO_HTMLFLAGS="--no-split --css-include=style.css --css-include=manual.css" | ||
582 | ],[ | ||
583 | AM_CONDITIONAL([ACTIVATE_TEXINFO4],false) | ||
584 | AC_DEFINE([ACTIVATE_TEXINFO04],[0],[Using texinfo version 5 or later switches]) | ||
585 | TEXINFO_HTMLFLAGS="--no-split --css-ref='../style.css' --css-ref='../manual.css'" | ||
586 | |||
587 | ]) | ||
588 | |||
589 | AC_SUBST([TEXINFO_HTMLFLAGS]) | ||
590 | |||
591 | # Adam shostack suggests the following for Windows: | ||
592 | # -D_FORTIFY_SOURCE=2 -fstack-protector-all | ||
593 | AC_ARG_ENABLE([gcc-hardening], | 488 | AC_ARG_ENABLE([gcc-hardening], |
594 | AS_HELP_STRING(--enable-gcc-hardening, enable compiler security checks), | 489 | [AS_HELP_STRING([--enable-gcc-hardening], [enable compiler security checks])], |
595 | [AS_IF([test x$enableval = xyes],[ | 490 | [AS_IF([test "x$enableval" = "xyes"], |
596 | CFLAGS="$CFLAGS -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fstack-protector-all" | 491 | [CFLAGS="$CFLAGS -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fstack-protector-all" |
597 | CFLAGS="$CFLAGS -fwrapv -fPIE -Wstack-protector" | 492 | CFLAGS="$CFLAGS -fwrapv -fPIE -Wstack-protector" |
598 | CFLAGS="$CFLAGS --param ssp-buffer-size=1" | 493 | CFLAGS="$CFLAGS --param ssp-buffer-size=1" |
599 | LDFLAGS="$LDFLAGS -pie" | 494 | LDFLAGS="$LDFLAGS -pie"])]) |
600 | ])]) | ||
601 | |||
602 | # Linker hardening options | ||
603 | # Currently these options are ELF specific - you can't use this with MacOSX | ||
604 | AC_ARG_ENABLE([linker-hardening], | ||
605 | AS_HELP_STRING(--enable-linker-hardening, enable linker security fixups), | ||
606 | [AS_IF([test x$enableval = xyes], | ||
607 | [LDFLAGS="$LDFLAGS -z relro -z now"])]) | ||
608 | 495 | ||
496 | AC_ARG_ENABLE([linker-hardening], | ||
497 | [AS_HELP_STRING([--enable-linker-hardening], [enable linker security options])], | ||
498 | [AS_IF([test "x$enableval" = "xyes"], | ||
499 | [LDFLAGS="$LDFLAGS -z relro -z now"])]) | ||
609 | 500 | ||
610 | AC_ARG_ENABLE([sanitizer], | 501 | AC_ARG_ENABLE([sanitizer], |
611 | AS_HELP_STRING(--enable-sanitizer, enable Address Sanitizer and Undefined Behavior Sanitizer), | 502 | [AS_HELP_STRING([--enable-sanitizer], |
612 | [AS_IF([test x$enableval = xyes],[ | 503 | [enable address and undefined behaviour sanitizers])], |
613 | LDFLAGS="$CFLAGS -fsanitize=address,undefined -fno-omit-frame-pointer" | 504 | [AS_IF([test "x$enableval" = "xyes"], |
614 | ])]) | 505 | [CFLAGS="$CFLAGS -fsanitize=address,undefined -fno-omit-frame-pointer"])]) |
615 | |||
616 | 506 | ||
507 | # Logging | ||
617 | extra_logging=GNUNET_NO | 508 | extra_logging=GNUNET_NO |
618 | AC_ARG_ENABLE([logging], | 509 | AC_ARG_ENABLE([logging], |
619 | AS_HELP_STRING([--enable-logging@<:@=value@:>@],[Enable logging calls. Possible values: yes,no,verbose,veryverbose ('yes' is the default)]), | 510 | [AS_HELP_STRING([--enable-logging@<:@=value@:>@], |
620 | [AS_IF([test "x$enableval" = "xyes"], [], | 511 | [enable logging calls; possible values: yes,no,verbose,veryverbose (default yes)])], |
621 | [test "x$enableval" = "xno"], [AC_DEFINE([GNUNET_CULL_LOGGING],[],[Define to cull all logging calls])], | 512 | [AS_CASE([$enableval], |
622 | [test "x$enableval" = "xverbose"], [extra_logging=GNUNET_YES] | 513 | [yes], |
623 | [test "x$enableval" = "xveryverbose"], [extra_logging=\(GNUNET_YES+1\)]) | 514 | [extra_logging=GNUNET_NO], |
624 | ], []) | 515 | [no], |
625 | AC_DEFINE_UNQUOTED([GNUNET_EXTRA_LOGGING],[$extra_logging],[1 if extra logging is enabled, 2 for very verbose extra logging, 0 otherwise]) | 516 | [extra_logging=GNUNET_NO |
626 | 517 | AC_DEFINE([GNUNET_CULL_LOGGING], [1], | |
627 | # should memory poisoning be enabled? | 518 | [Define to 1 to cull all logging calls])], |
628 | AC_MSG_CHECKING(whether to poison freed memory) | 519 | [verbose], |
629 | AC_ARG_ENABLE([poisoning], | 520 | [extra_logging=GNUNET_YES], |
630 | [AS_HELP_STRING([--enable-poisoning], [enable poisoning of freed memory (good for debugging)])], | 521 | [veryverbose], [extra_logging=\(GNUNET_YES+1\)], |
631 | [enable_poisoning=${enableval}], | 522 | [extra_logging=GNUNET_NO])]) |
632 | [ | 523 | AC_DEFINE_UNQUOTED([GNUNET_EXTRA_LOGGING], [$extra_logging], |
633 | AS_IF([test "x$extra_logging" != "xGNUNET_NO"], | 524 | [Define to 1 if extra logging is enabled, 2 for very verbose logging]) |
634 | [enable_poisoning="defaults to yes (extra logging is enabled)"], | ||
635 | [enable_poisoning=no]) | ||
636 | ]) | ||
637 | AC_MSG_RESULT($enable_poisoning) | ||
638 | AS_IF([test ! "x$enable_poisoning" = "xno"], | ||
639 | [enable_poisoning=1], | ||
640 | [enable_poisoning=0]) | ||
641 | AC_DEFINE_UNQUOTED([ENABLE_POISONING],[$enable_poisoning],[1 if freed memory should be poisoned, 0 otherwise]) | ||
642 | |||
643 | AS_IF([test $build = $target], | ||
644 | [ | ||
645 | AC_MSG_CHECKING([for working HMAC]) | ||
646 | AC_LANG_PUSH(C) | ||
647 | LIBS="$LIBS $LIBGCRYPT_LIBS" | ||
648 | CFLAGS="$CFLAGS $LIBGCRYPT_CFLAGS" | ||
649 | AC_RUN_IFELSE( | ||
650 | [AC_LANG_PROGRAM([#include <gcrypt.h> | ||
651 | #include <stdio.h>], [[ | ||
652 | gcry_md_hd_t mac; | ||
653 | |||
654 | unsigned char data[] = { 0xbf, 0x16, 0x6e, 0x46, 0x3a, 0x6c, 0xf3, 0x93, 0xa7, 0x72, | ||
655 | 0x11, 0xa1, 0xdc, 0x0b, 0x07, 0xdb, 0x1a, 0x5e, 0xd9, 0xb9, 0x81, 0xbe, | ||
656 | 0xea, 0xe4, 0x31, 0x5f, 0x24, 0xff, 0xfe, 0x50, 0x8a, 0xde }; | ||
657 | unsigned char key[] = { 0xfc, 0x62, 0x76, 0x35 }; | ||
658 | unsigned char result[] = {0xa2, 0xb, 0x1, 0xd9, 0xc0, 0x8b, 0x5a, 0x12, 0x80, | ||
659 | 0xd5, 0x50, 0x12, 0x8e, 0xd0, 0x5b, 0xb6, 0x5c, 0x87, 0x24, 0xe2, 0xd0, | ||
660 | 0xd2, 0xaf, 0x63, 0xae, 0xd1, 0xd6, 0x64, 0x14, 0xe3, 0x6e, 0x61, 0x5b, | ||
661 | 0xd, 0xba, 0x17, 0x7d, 0xd3, 0x10, 0xb1, 0x37, 0x41, 0x91, 0x7d, 0xeb, | ||
662 | 0x1, 0x4d, 0x71, 0xe8, 0x59, 0x71, 0x42, 0x8e, 0xd6, 0xf3, 0x29, 0x3b, | ||
663 | 0x90, 0xf2, 0xd1, 0xaf, 0x65, 0x1e, 0xb3}; | ||
664 | |||
665 | if (!gcry_check_version (GCRYPT_VERSION)) | ||
666 | { | ||
667 | fprintf (stderr, "Version mismatch %s <-> %s \n", gcry_check_version (NULL), GCRYPT_VERSION); | ||
668 | return 1; | ||
669 | } | ||
670 | |||
671 | gcry_control (GCRYCTL_DISABLE_SECMEM, 0); | ||
672 | gcry_control (GCRYCTL_INITIALIZATION_FINISHED, 0); | ||
673 | |||
674 | if (gcry_md_open(&mac, GCRY_MD_SHA512, GCRY_MD_FLAG_HMAC) != GPG_ERR_NO_ERROR) | ||
675 | { | ||
676 | fprintf (stderr, "gcry_md_open error\n"); | ||
677 | return 2; | ||
678 | } | ||
679 | |||
680 | gcry_md_setkey (mac, key, sizeof (key)); | ||
681 | gcry_md_write (mac, data, sizeof (data)); | ||
682 | |||
683 | if (memcmp(gcry_md_read (mac, 0), result, gcry_md_get_algo_dlen (gcry_md_get_algo (mac))) != 0) | ||
684 | { | ||
685 | fprintf (stderr, "memcmp error\n"); | ||
686 | return 3; | ||
687 | } | ||
688 | |||
689 | gcry_md_close (mac); | ||
690 | |||
691 | return 0; | ||
692 | ]])], | ||
693 | [AC_MSG_RESULT([yes])], | ||
694 | [ | ||
695 | RESULT=$? | ||
696 | if test $RESULT = 3 | ||
697 | then | ||
698 | AC_MSG_FAILURE([HMAC test vector does not match. This is a known problem with libgcrypt 1.2.2 on Windows and fixed in 1.4.6.]) | ||
699 | fi | ||
700 | if test $RESULT = 2 | ||
701 | then | ||
702 | AC_MSG_FAILURE([HMAC test failed]) | ||
703 | fi | ||
704 | if test $RESULT = 1 | ||
705 | then | ||
706 | AC_MSG_FAILURE([libgcrypt header version does not match library version]) | ||
707 | fi | ||
708 | ], | ||
709 | [AC_MSG_RESULT([cross compiling, test skipped])]) | ||
710 | AC_LANG_POP(C) | ||
711 | ]) # $build = $target | ||
712 | |||
713 | AC_COMPILE_IFELSE([AC_LANG_SOURCE( | ||
714 | [[int main() { | ||
715 | _Static_assert(sizeof(int) >= 4, "not big enough"); | ||
716 | return 0; | ||
717 | };]])], | ||
718 | [AC_DEFINE([HAVE_STATIC_ASSERT],[1],[Static assertions supported])], | ||
719 | [AC_DEFINE([HAVE_STATIC_ASSERT],[0],[Static assertions not supported])]) | ||
720 | |||
721 | # check for bluetooth library | ||
722 | bluetooth=0 | ||
723 | AC_MSG_CHECKING(for libbluetooth) | ||
724 | AC_ARG_WITH(libbluetooth, | ||
725 | [ --with-libbluetooth=PREFIX (base of libbluetooth installation)], | ||
726 | [AC_MSG_RESULT([$with_libbluetooth]) | ||
727 | AS_CASE([$with_libbluetooth], | ||
728 | [no],[], | ||
729 | [yes],[ | ||
730 | CHECK_LIBHEADER(BLUETOOTH, | ||
731 | bluetooth, | ||
732 | ba2str, | ||
733 | bluetooth/bluetooth.h, | ||
734 | bluetooth=1,) | ||
735 | ],[ | ||
736 | LDFLAGS="-L$with_libbluetooth/lib $LDFLAGS" | ||
737 | CPPFLAGS="-I$with_libbluetooth/include $CPPFLAGS" | ||
738 | AC_CHECK_HEADERS(bluetooth/bluetooth.h, | ||
739 | AC_CHECK_LIB([bluetooth], | ||
740 | [ba2str], | ||
741 | EXT_LIB_PATH="-L$with_libbluetooth/lib $EXT_LIB_PATH" | ||
742 | bluetooth=1)) | ||
743 | ]) | ||
744 | ], | ||
745 | [AC_MSG_RESULT([--with-libbluetooth not specified]) | ||
746 | CHECK_LIBHEADER(BLUETOOTH, | ||
747 | bluetooth, | ||
748 | ba2str, | ||
749 | bluetooth/bluetooth.h, | ||
750 | bluetooth=1,)]) | ||
751 | AM_CONDITIONAL(HAVE_LIBBLUETOOTH, [test "$bluetooth" = 1]) | ||
752 | AS_IF([test "$bluetooth" = 1], | ||
753 | [AC_DEFINE([HAVE_LIBBLUETOOTH],[1],[Have bluetooth library])], | ||
754 | [AC_DEFINE([HAVE_LIBBLUETOOTH],[0],[Lacking bluetooth library])]) | ||
755 | |||
756 | # check for zbar library | ||
757 | # NOTE: Do not add checks for: -lSM, -lICE, -lX11, -lXv and -ljpeg | ||
758 | # NOTE: they must be provided by the build environment, not the | ||
759 | # NOTE: build-system of gnunet, as they are 2nd or 3rd level dependencies. | ||
760 | zbar=0 | ||
761 | AC_MSG_CHECKING(for libzbar) | ||
762 | AC_ARG_WITH(zbar, | ||
763 | [ --with-zbar=PREFIX (base of libzbar installation)], | ||
764 | [AC_MSG_RESULT([$with_zbar]) | ||
765 | AS_CASE([$with_zbar], | ||
766 | [no],[], | ||
767 | [yes],[CHECK_LIBHEADER(ZBAR, zbar, zbar_processor_create, zbar.h,zbar=1,,)], | ||
768 | [ | ||
769 | LDFLAGS="-L$with_zbar/lib $LDFLAGS" | ||
770 | CPPFLAGS="-I$with_zbar/include $CPPFLAGS" | ||
771 | AC_CHECK_HEADERS(zbar.h, | ||
772 | AC_CHECK_LIB([zbar], [zbar_processor_create], | ||
773 | EXT_LIB_PATH="-L$with_zbar/lib $EXT_LIB_PATH" | ||
774 | zbar=1)) | ||
775 | ]) | ||
776 | ], | ||
777 | [AC_MSG_RESULT([--with-zbar not specified]) | ||
778 | CHECK_LIBHEADER(ZBAR, zbar, zbar_processor_create, zbar.h,zbar=1,,)]) | ||
779 | AM_CONDITIONAL(HAVE_ZBAR, [test "$zbar" = 1]) | ||
780 | AS_IF([test "x$zbar" = x1], | ||
781 | [AC_DEFINE([HAVE_ZBAR],[1],[Have zbar library])], | ||
782 | [AC_DEFINE([HAVE_ZBAR],[0],[Lacking zbar library])]) | ||
783 | |||
784 | # check for libpabc library | ||
785 | pabc=0 | ||
786 | AC_MSG_CHECKING(for libpabc) | ||
787 | AC_ARG_WITH(pabc, | ||
788 | [ --with-pabc=PREFIX (base of libpabc installation)], | ||
789 | [AC_MSG_RESULT([$with_pabc]) | ||
790 | AS_CASE([$with_pabc], | ||
791 | [no],[], | ||
792 | [yes],[ | ||
793 | CHECK_LIBHEADER(PABC, pabc, pabc_new_ctx, pabc/pabc.h,pabc=1,) | ||
794 | ],[ | ||
795 | LDFLAGS="-L$with_pabc/lib $LDFLAGS" | ||
796 | CPPFLAGS="-I$with_pabc/include $CPPFLAGS" | ||
797 | AC_CHECK_HEADERS(pabc/pabc.h, | ||
798 | AC_CHECK_LIB([pabc], [pabc_new_ctx], | ||
799 | EXT_LIB_PATH="-L$with_pabc/lib $EXT_LIB_PATH" | ||
800 | pabc=1)) | ||
801 | ]) | ||
802 | ], | ||
803 | [AC_MSG_RESULT([--with-pabc not specified]) | ||
804 | CHECK_LIBHEADER(PABC, pabc, pabc_new_ctx, pabc/pabc.h,pabc=1,)]) | ||
805 | AM_CONDITIONAL(HAVE_PABC, [test x$pabc = x1]) | ||
806 | |||
807 | |||
808 | # check for jansson library | ||
809 | jansson=0 | ||
810 | AC_MSG_CHECKING(for libjansson) | ||
811 | AC_ARG_WITH(jansson, | ||
812 | [ --with-jansson=PREFIX (base of libjansson installation)], | ||
813 | [AC_MSG_RESULT([$with_jansson]) | ||
814 | AS_CASE([$with_jansson], | ||
815 | [no],[], | ||
816 | [yes],[ | ||
817 | CHECK_LIBHEADER(JANSSON, jansson, json_loads, jansson.h,jansson=1,) | ||
818 | ],[ | ||
819 | LDFLAGS="-L$with_jansson/lib $LDFLAGS" | ||
820 | CPPFLAGS="-I$with_jansson/include $CPPFLAGS" | ||
821 | AC_CHECK_HEADERS(jansson.h, | ||
822 | AC_CHECK_LIB([jansson], [json_loads], | ||
823 | EXT_LIB_PATH="-L$with_jansson/lib $EXT_LIB_PATH" | ||
824 | jansson=1)) | ||
825 | ]) | ||
826 | ], | ||
827 | [AC_MSG_RESULT([--with-jansson not specified]) | ||
828 | CHECK_LIBHEADER(JANSSON, jansson, json_loads, jansson.h,jansson=1,)]) | ||
829 | |||
830 | AS_IF([test "x$jansson" != x1], | ||
831 | [AC_MSG_ERROR([GNUnet requires libjansson])]) | ||
832 | |||
833 | # check for libpulse(audio) library | ||
834 | pulse=0 | ||
835 | libpulse_msg="no" | ||
836 | AC_MSG_CHECKING(for libpulse) | ||
837 | # TODO: --with-libpulse or --with-pulseaudio? What is more established | ||
838 | # TODO: in this context? | ||
839 | AC_ARG_WITH(libpulse, | ||
840 | [ --with-libpulse=PREFIX (base of libpulse installation)], | ||
841 | [AC_MSG_RESULT([$with_libpulse]) | ||
842 | AS_CASE([$with_libpulse], | ||
843 | [no],[], | ||
844 | [yes],[ | ||
845 | CHECK_LIBHEADER(LIBPULSE, | ||
846 | pulse, | ||
847 | pa_stream_peek, | ||
848 | pulse/simple.h, | ||
849 | pulse=1,) | ||
850 | ],[ | ||
851 | LDFLAGS="-L$with_libpulse/lib $LDFLAGS" | ||
852 | CPPFLAGS="-I$with_libpulse/include $CPPFLAGS" | ||
853 | AC_CHECK_HEADERS(pulse/simple.h, | ||
854 | AC_CHECK_LIB([pulse], | ||
855 | [pa_stream_peek], | ||
856 | EXT_LIB_PATH="-L$with_libpulse/lib $EXT_LIB_PATH" | ||
857 | pulse=1)) | ||
858 | ]) | ||
859 | ], | ||
860 | [AC_MSG_RESULT([--with-libpulse not specified]) | ||
861 | CHECK_LIBHEADER(LIBPULSE, | ||
862 | pulse, | ||
863 | pa_stream_peek, | ||
864 | pulse/simple.h, | ||
865 | pulse=1,)]) | ||
866 | AM_CONDITIONAL(HAVE_PULSE, [test "$pulse" = 1]) | ||
867 | AS_IF([test x"$pulse" = x1], | ||
868 | [AC_DEFINE([HAVE_PULSE],[1],[Have libpulse(audio) library]) | ||
869 | libpulse_msg="yes"], | ||
870 | [AC_DEFINE([HAVE_PULSE],[0],[Lacking libpulse(audio) library]) | ||
871 | libpulse_msg="no"]) | ||
872 | |||
873 | # check for libopus(audio) library | ||
874 | opus=0 | ||
875 | libopus_msg="no" | ||
876 | AC_MSG_CHECKING(for libopus) | ||
877 | AC_ARG_WITH(libopus, | ||
878 | [ --with-libopus=PREFIX (base of libopus installation)], | ||
879 | [AC_MSG_RESULT([$with_libopus]) | ||
880 | AS_CASE([$with_libopus], | ||
881 | [no],[], | ||
882 | [yes],[ | ||
883 | CHECK_LIBHEADER(LIBOPUS, | ||
884 | opus, | ||
885 | opus_decode_float, | ||
886 | opus/opus.h, | ||
887 | AC_CHECK_DECL([OPUS_SET_GAIN], | ||
888 | [opus=1], | ||
889 | [], | ||
890 | [[ | ||
891 | #include <opus/opus.h> | ||
892 | ]])) | ||
893 | ],[ | ||
894 | LDFLAGS="-L$with_libopus/lib $LDFLAGS" | ||
895 | CPPFLAGS="-I$with_libopus/include $CPPFLAGS" | ||
896 | AC_CHECK_HEADERS(opus/opus.h, | ||
897 | AC_CHECK_LIB([opus], | ||
898 | [OPUS_SET_GAIN], | ||
899 | EXT_LIB_PATH="-L$with_libopus/lib $EXT_LIB_PATH" | ||
900 | opus=1)) | ||
901 | ]) | ||
902 | ], | ||
903 | [AC_MSG_RESULT([--with-libopus not specified]) | ||
904 | CHECK_LIBHEADER(LIBOPUS, | ||
905 | opus, | ||
906 | opus_decode_float, | ||
907 | opus/opus.h, | ||
908 | AC_CHECK_DECL([OPUS_SET_GAIN], | ||
909 | [opus=1], | ||
910 | [], | ||
911 | [[ | ||
912 | #include <opus/opus.h> | ||
913 | ]]))]) | ||
914 | AM_CONDITIONAL(HAVE_OPUS, [test "$opus" = 1]) | ||
915 | AS_IF([test "x$opus" = x1], | ||
916 | [AC_DEFINE([HAVE_OPUS],[1],[Have libopus library]) | ||
917 | libopus_msg="yes"], | ||
918 | [AC_DEFINE([HAVE_OPUS],[0],[Lacking libopus library]) | ||
919 | libopus_msg="no (required for conversation)"]) | ||
920 | |||
921 | # libogg | ||
922 | AC_MSG_CHECKING(for libogg) | ||
923 | AC_ARG_WITH(libogg, | ||
924 | [ --with-libogg=PREFIX (base of libogg installation)], | ||
925 | [AC_MSG_RESULT([$with_libogg]) | ||
926 | AS_CASE([$with_libogg], | ||
927 | [no],[], | ||
928 | [yes],[ | ||
929 | CHECK_LIBHEADER(LIBOGG, | ||
930 | ogg, | ||
931 | ogg_stream_flush_fill, | ||
932 | ogg/ogg.h, | ||
933 | ogg=1,) | ||
934 | ],[ | ||
935 | LDFLAGS="-L$with_libogg/lib $LDFLAGS" | ||
936 | CPPFLAGS="-I$with_libogg/include $CPPFLAGS" | ||
937 | AC_CHECK_HEADERS(ogg/ogg.h, | ||
938 | AC_CHECK_LIB([ogg], | ||
939 | [ogg_stream_flush_fill], | ||
940 | EXT_LIB_PATH="-L$with_libogg/lib $EXT_LIB_PATH" | ||
941 | ogg=1)) | ||
942 | ]) | ||
943 | ], | ||
944 | [AC_MSG_RESULT([--with-libogg not specified]) | ||
945 | CHECK_LIBHEADER(LIBOGG, | ||
946 | ogg, | ||
947 | ogg_stream_flush_fill, | ||
948 | ogg/ogg.h, | ||
949 | ogg=1,)]) | ||
950 | AM_CONDITIONAL(HAVE_OGG, [test "$ogg" = 1]) | ||
951 | AS_IF([test x"$ogg" = x1], | ||
952 | [AC_DEFINE([HAVE_OGG],[1],[Have ogg])], | ||
953 | [AC_DEFINE([HAVE_OGG],[0],[Lacking ogg])]) | ||
954 | |||
955 | |||
956 | PKG_CHECK_MODULES([GLIB], | ||
957 | [glib-2.0], | ||
958 | [# check for pbc library | ||
959 | pbc=0 | ||
960 | AC_CHECK_HEADER([pbc/pbc.h],pbc=1) | ||
961 | AC_CHECK_HEADER([gabe.h],abe=1) | ||
962 | AM_CONDITIONAL(HAVE_PBC, [test "x$pbc" = x1]) | ||
963 | AM_CONDITIONAL(HAVE_ABE, [test "x$abe" = x1]) | ||
964 | AS_IF([test "x$pbc" = x1], | ||
965 | [AC_DEFINE([HAVE_PBC],[1],[Have pbc library])], | ||
966 | [AC_DEFINE([HAVE_PBC],[0],[Lacking pbc library])]) | ||
967 | AS_IF([test "x$abe" = x1], | ||
968 | [AC_DEFINE([HAVE_ABE],[1],[Have ABE library])], | ||
969 | [AC_DEFINE([HAVE_ABE],[0],[Lacking ABE library])])], | ||
970 | [# glib-2 not found | ||
971 | AM_CONDITIONAL(HAVE_PBC, [false]) | ||
972 | AM_CONDITIONAL(HAVE_ABE, [false]) | ||
973 | AC_DEFINE([HAVE_PBC],[0],[Lacking glib library])]) | ||
974 | |||
975 | |||
976 | gst=0 | ||
977 | gstreamer_msg="no" | ||
978 | AC_MSG_CHECKING(for gstreamer) | ||
979 | PKG_CHECK_MODULES( | ||
980 | [GST], | ||
981 | [glib-2.0 gobject-2.0 gstreamer-1.0 gstreamer-app-1.0 gstreamer-audio-1.0], | ||
982 | [gst=1 | ||
983 | gstreamer_msg="yes"], | ||
984 | [gst=0]) | ||
985 | 525 | ||
986 | # conversation | 526 | AC_ARG_ENABLE([poisoning], |
987 | AC_MSG_CHECKING(conversation feature set to build) | 527 | [AS_HELP_STRING([--enable-poisoning], |
988 | AS_IF([test "x$pulse" != "x1" -o "x$opus" != "x1" -o "x$ogg" != "x1"],[ | 528 | [enable poisoning of freed memory (good for debugging)])], |
989 | AS_IF([test "x$gst" != "x1"],[ | 529 | [enable_poisoning=${enableval}], |
990 | conversation_backend=none | 530 | [enable_poisoning=missing]) |
991 | AM_CONDITIONAL(BUILD_PULSE_HELPERS, false) | 531 | |
992 | AM_CONDITIONAL(BUILD_GST_HELPERS, false) | 532 | AS_IF([test "x$enable_poisoning" = "xmissing"], |
993 | AM_CONDITIONAL(BUILD_EXPERIMENTAL_HELPERS, false) | 533 | [AS_IF([test "x$extra_logging" != "xGNUNET_NO"], |
994 | ],[ | 534 | [enable_poisoning=yes], |
995 | conversation_backend=gst | 535 | [enable_poisoning=no])]) |
996 | AM_CONDITIONAL(BUILD_PULSE_HELPERS, false) | 536 | |
997 | AM_CONDITIONAL(BUILD_GST_HELPERS, true) | 537 | AS_IF([test "x$enable_poisoning" = "xyes"], |
998 | AM_CONDITIONAL(BUILD_EXPERIMENTAL_HELPERS, false) | 538 | [AC_DEFINE([ENABLED_POISONING], [1], |
999 | ]) | 539 | [Define to 1 if freed memory is poisoned])], |
1000 | ],[ | 540 | [AC_DEFINE([ENABLED_POISONING], [0], |
1001 | conversation_backend=pulse | 541 | [Define to 1 if freed memory is poisoned])]) |
1002 | AM_CONDITIONAL(BUILD_PULSE_HELPERS, true) | 542 | |
1003 | AM_CONDITIONAL(BUILD_GST_HELPERS, false) | 543 | AS_IF([test "$build" = "$target"], |
1004 | AM_CONDITIONAL(BUILD_EXPERIMENTAL_HELPERS, false) | 544 | [AC_MSG_CHECKING([for a working HMAC]) |
1005 | ]) | 545 | AC_LANG_PUSH([C]) |
546 | LIBS="$LIBS $LIBGCRYPT_LIBS" | ||
547 | CFLAGS="$CFLAGS $LIBGCRYPT_CFLAGS" | ||
548 | AC_RUN_IFELSE( | ||
549 | [AC_LANG_PROGRAM([#include <gcrypt.h>], | ||
550 | [[gcry_md_hd_t mac; | ||
551 | unsigned char data[] = { | ||
552 | 0xbf, 0x16, 0x6e, 0x46, 0x3a, 0x6c, 0xf3, 0x93, 0xa7, 0x72, | ||
553 | 0x11, 0xa1, 0xdc, 0x0b, 0x07, 0xdb, 0x1a, 0x5e, 0xd9, 0xb9, 0x81, 0xbe, | ||
554 | 0xea, 0xe4, 0x31, 0x5f, 0x24, 0xff, 0xfe, 0x50, 0x8a, 0xde | ||
555 | }; | ||
556 | |||
557 | unsigned char key[] = { 0xfc, 0x62, 0x76, 0x35 }; | ||
558 | |||
559 | unsigned char result[] = { | ||
560 | 0xa2, 0xb, 0x1, 0xd9, 0xc0, 0x8b, 0x5a, 0x12, 0x80, | ||
561 | 0xd5, 0x50, 0x12, 0x8e, 0xd0, 0x5b, 0xb6, 0x5c, 0x87, 0x24, 0xe2, 0xd0, | ||
562 | 0xd2, 0xaf, 0x63, 0xae, 0xd1, 0xd6, 0x64, 0x14, 0xe3, 0x6e, 0x61, 0x5b, | ||
563 | 0xd, 0xba, 0x17, 0x7d, 0xd3, 0x10, 0xb1, 0x37, 0x41, 0x91, 0x7d, 0xeb, | ||
564 | 0x1, 0x4d, 0x71, 0xe8, 0x59, 0x71, 0x42, 0x8e, 0xd6, 0xf3, 0x29, 0x3b, | ||
565 | 0x90, 0xf2, 0xd1, 0xaf, 0x65, 0x1e, 0xb3 | ||
566 | }; | ||
567 | |||
568 | if (!gcry_check_version (GCRYPT_VERSION)) | ||
569 | { | ||
570 | return 1; | ||
571 | } | ||
572 | |||
573 | gcry_control (GCRYCTL_DISABLE_SECMEM, 0); | ||
574 | gcry_control (GCRYCTL_INITIALIZATION_FINISHED, 0); | ||
575 | |||
576 | if (gcry_md_open(&mac, GCRY_MD_SHA512, GCRY_MD_FLAG_HMAC) != GPG_ERR_NO_ERROR) | ||
577 | { | ||
578 | return 2; | ||
579 | } | ||
580 | |||
581 | gcry_md_setkey (mac, key, sizeof (key)); | ||
582 | gcry_md_write (mac, data, sizeof (data)); | ||
583 | |||
584 | if (memcmp(gcry_md_read (mac, 0), | ||
585 | result, | ||
586 | gcry_md_get_algo_dlen (gcry_md_get_algo (mac))) != 0) | ||
587 | { | ||
588 | return 3; | ||
589 | } | ||
590 | |||
591 | gcry_md_close (mac);]])], | ||
592 | [AC_MSG_RESULT([yes])], | ||
593 | [AC_MSG_RESULT([no]) | ||
594 | RESULT=$? | ||
595 | AS_CASE([$RESULT], | ||
596 | [1], | ||
597 | [AC_MSG_FAILURE([libgcrypt header version does not match library])], | ||
598 | [2], | ||
599 | [AC_MSG_FAILURE([HMAC test failed])], | ||
600 | [3], | ||
601 | [AC_MSG_FAILURE([HMAC test vector does not match. This is a known problem with libgcrypt 1.2.2 on Windows and it's fixed in 1.4.6])], | ||
602 | [])], | ||
603 | [AC_MSG_RESULT([cross compiling, test skipped])]) | ||
604 | AC_LANG_POP([C])]) | ||
605 | |||
606 | dnl Helper function to shorten the amount of repeated code | ||
607 | dnl It will create a --with-<lib> option for configure. | ||
608 | dnl | ||
609 | dnl CHECK_WITH_LIB(LIBNAME, FUNC, HEADER, DEFINE-SYM) | ||
610 | dnl LIBNAME is the name of a library without the 'lib' prefix, e.g. 'bluetooth' | ||
611 | dnl for 'libbluetooth'. | ||
612 | dnl DEFINE-SYM is a symbol to define using AC_DEFINE; it will be set to 1 if the | ||
613 | dnl library is available, 0 otherwise. | ||
614 | dnl | ||
615 | dnl The variable LIBNAME (that is, the identifier passed as the first argument) | ||
616 | dnl is kept with the result: 0 if not available, 1 if available. | ||
617 | dnl For example: CHECK_WITH_LIB(foo, ...) will generate $foo. | ||
618 | AC_DEFUN([CHECK_WITH_LIB], | ||
619 | [AC_ARG_WITH([$1], | ||
620 | [AS_HELP_STRING([--with-][$1][=PFX], [base of lib][$1][ installation])], | ||
621 | [AS_CASE([$withval], | ||
622 | [no], | ||
623 | [eval "AS_TR_SH([$1])=0"], | ||
624 | [yes], | ||
625 | [CHECK_LIBHEADER([m4_translit([$1], [a-z], [A-Z])], | ||
626 | [$1], [$2], [$3], | ||
627 | [eval "AS_TR_SH([$1])=1"], | ||
628 | [eval "AS_TR_SH([$1])=0"])], | ||
629 | [CHECK_LIBHEADER([m4_translit([$1], [a-z], [A-Z])], | ||
630 | [$1], [$2], [$3], | ||
631 | [eval "AS_TR_SH([$1])=1"], | ||
632 | [eval "AS_TR_SH([$1])=0"], | ||
633 | [-L${withval}/lib], | ||
634 | [-I${withval}/include]) | ||
635 | AS_IF([test "x$][AS_TR_SH([$1])][" = "x1"], | ||
636 | [EXT_LIB_PATH="-L${withval}/lib $EXT_LIB_PATH"])])], | ||
637 | [CHECK_LIBHEADER([m4_translit([$1], [a-z], [A-Z])], | ||
638 | [$1], [$2], [$3], | ||
639 | [eval "AS_TR_SH([$1])=1"], | ||
640 | [eval "AS_TR_SH([$1])=0"])]) | ||
641 | |||
642 | AM_CONDITIONAL([$4], [test "x$][AS_TR_SH([$1])][" = "x1"]) | ||
643 | AC_DEFINE_UNQUOTED([$4], [$][AS_TR_SH([$1])], [Define to 1 if available]) | ||
644 | ])dnl | ||
645 | |||
646 | # check for libbluetooth | ||
647 | CHECK_WITH_LIB([bluetooth], | ||
648 | [ba2str], | ||
649 | [bluetooth/bluetooth.h], | ||
650 | [HAVE_LIBBLUETOOTH]) | ||
651 | |||
652 | # check for libzbar | ||
653 | CHECK_WITH_LIB([zbar], [zbar_processor_create], [zbar.h], [HAVE_ZBAR]) | ||
654 | |||
655 | # check for libpng library | ||
656 | # this check is for an optional feature of gnunet-qr. | ||
657 | # the PNG format was chosen mostly arbitrarilyy: while it's true that more | ||
658 | # modern formats exists that can be used in stead of PNG, it's also true that | ||
659 | # it's more common for systems to ship with libpng than other codecs; also, a | ||
660 | # black-or-white picture of squares is one of the cases where PNG shines the | ||
661 | # most, so the advantages of other formats becomes less important. | ||
662 | AS_IF([test "x$zbar" = "x1"], | ||
663 | [CHECK_WITH_LIB([png], [png_create_read_struct], [png.h], [HAVE_PNG])], | ||
664 | [AM_CONDITIONAL([HAVE_PNG], [false]) | ||
665 | AC_DEFINE([HAVE_PNG], [0], [Define to 1 if libpng is available])]) | ||
1006 | 666 | ||
1007 | AS_IF([test "x$conversation_backend" = "xnone"], | 667 | # check for libpabc |
1008 | AM_CONDITIONAL(BUILD_CONVERSATION, false), | 668 | CHECK_WITH_LIB([pabc], [pabc_new_ctx], [pabc/pabc.h], [HAVE_PABC]) |
1009 | AM_CONDITIONAL(BUILD_CONVERSATION, true)) | ||
1010 | |||
1011 | # libgnurl | ||
1012 | LIBGNURL_CHECK_CONFIG(,7.34.0,gnurl=1,gnurl=0) | ||
1013 | |||
1014 | SAVE_CPPFLAGS=$CPPFLAGS | ||
1015 | CPPFLAGS="$LIBGNURL_CPPFLAGS $LIBCURL_CPPFLAGS $CPPFLAGS" | ||
1016 | LIBS="$LIBGNURL $LIBCURL $LIBS" | ||
1017 | |||
1018 | # libcurl-gnutls | ||
1019 | LIBCURL_CHECK_CONFIG(,7.34.0,[curl=true],[curl=false]) | ||
1020 | AS_IF([test "x$curl" = xtrue],[ | ||
1021 | AC_CHECK_HEADER([curl/curl.h], | ||
1022 | AC_CHECK_DECLS(CURLINFO_TLS_SESSION,[curl=true],[curl=false],[[#include <curl/curl.h>]]), | ||
1023 | [curl=false]) | ||
1024 | # need libcurl-gnutls.so for proxy, warn later if not found. | ||
1025 | AC_CHECK_LIB([curl-gnutls],[curl_easy_getinfo],[curl_gnutls=true],[curl_gnutls=false]) | ||
1026 | # cURL must support CURLINFO_TLS_SESSION, version >= 7.34 | ||
1027 | ]) | ||
1028 | 669 | ||
1029 | # libcurl and libgnurl should be mutually exclusive | 670 | # check for jansson |
1030 | AS_IF([test "$gnurl" = 1], | 671 | CHECK_WITH_LIB([jansson], [json_loads], [jansson.h], [HAVE_JANSSON]) |
1031 | [AM_CONDITIONAL(HAVE_LIBGNURL, true) | 672 | AS_IF([test "x$jansson" = "x0"], |
1032 | AC_DEFINE([HAVE_LIBGNURL],[1],[Have libgnurl]) | 673 | [AC_MSG_ERROR([GNUnet requires jansson])]) |
1033 | AM_CONDITIONAL(HAVE_LIBCURL, false) | ||
1034 | AC_DEFINE([HAVE_LIBCURL],[0],[Lacking libcurl])], | ||
1035 | [AS_IF([test "$curl" = true], | ||
1036 | [AM_CONDITIONAL(HAVE_LIBGNURL, false) | ||
1037 | AC_DEFINE([HAVE_LIBGNURL],[0],[Lacking libgnurl]) | ||
1038 | AM_CONDITIONAL(HAVE_LIBCURL, true) | ||
1039 | AC_DEFINE([HAVE_LIBCURL],[1],[Have libcurl])], | ||
1040 | [AC_MSG_ERROR([GNUnet requires libcurl or gnurl >= 7.34]) | ||
1041 | AM_CONDITIONAL(HAVE_LIBGNURL, false) | ||
1042 | AC_DEFINE([HAVE_LIBGNURL],[0],[Lacking libgnurl]) | ||
1043 | AM_CONDITIONAL(HAVE_LIBCURL, false) | ||
1044 | AC_DEFINE([HAVE_LIBCURL],[0],[Lacking libcurl])])]) | ||
1045 | |||
1046 | AC_SEARCH_LIBS(__atomic_load_8, atomic, [have_libatomic=1 AC_DEFINE(HAVE_LIBATOMIC,1,[external libatomic])]) | ||
1047 | AM_CONDITIONAL(HAVE_LIBATOMIC, [test "$have_libatomic" = 1]) | ||
1048 | |||
1049 | # restore LIBS & CPPFLAGS | ||
1050 | LIBS=$SAVE_LIBS | ||
1051 | CPPFLAGS=$SAVE_CPPFLAGS | ||
1052 | |||
1053 | |||
1054 | AC_CHECK_HEADERS([nss.h],[nss=true],[nss=false]) | ||
1055 | AS_IF([test x$nss = xfalse], | ||
1056 | [ | ||
1057 | AM_CONDITIONAL(HAVE_GLIBCNSS, false) | ||
1058 | AC_MSG_WARN([No GNU libc nss header, will not build NSS plugin]) | ||
1059 | ],[ | ||
1060 | NSS_INCLUDES=" | ||
1061 | #include <nss.h> | ||
1062 | " | ||
1063 | AC_CHECK_DECL([NSS_STATUS_UNAVAIL], | ||
1064 | [AM_CONDITIONAL(HAVE_GLIBCNSS, true)], | ||
1065 | [AM_CONDITIONAL(HAVE_GLIBCNSS, false) | ||
1066 | AC_MSG_WARN([No nss header fails to define NSS_STATUS_UNAVAIl, will not build NSS plugin])], | ||
1067 | [$NSS_INCLUDES]) | ||
1068 | ]) | ||
1069 | 674 | ||
675 | # check for jose | ||
676 | CHECK_WITH_LIB([jose], [jose_jwk_gen], [jose/jose.h], [HAVE_JOSE]) | ||
677 | AS_IF([test "x$jose" = "x0"], | ||
678 | [AC_MSG_WARN([reclaimID OpenID Connect plugin requires jose])]) | ||
1070 | 679 | ||
680 | # check for libpulse (pulseaudio) | ||
681 | CHECK_WITH_LIB([pulse], [pa_stream_peek], [pulse/simple.h], [HAVE_PULSE]) | ||
1071 | 682 | ||
1072 | # test for kvm and kstat (for CPU stats under BSD/Solaris) | 683 | # check for libopus |
1073 | AC_CHECK_LIB([kvm],[kvm_open]) | 684 | # Note: this might need to be expanded if a more detailed check is needed. |
1074 | AC_CHECK_LIB([kstat],[kstat_open]) | 685 | # For example, before CHECK_WITH_LIB was created, it used to look for |
1075 | 686 | # "OPUS_SET_GAIN" in libopus | |
1076 | libsodium=0 | 687 | CHECK_WITH_LIB([opus], [opus_decode_float], [opus/opus.h], [HAVE_OPUS]) |
1077 | # test for libsodium >=1.018 (introduction of | ||
1078 | # crypto_scalarmult_ed25519_base_noclamp API) | ||
1079 | AC_CHECK_HEADER([sodium.h], | ||
1080 | [AC_CHECK_LIB([sodium], [crypto_core_ed25519_scalar_mul], | ||
1081 | [libsodium=1])]) | ||
1082 | |||
1083 | AS_IF([test x$libsodium = x0], | ||
1084 | [AC_MSG_ERROR([GNUnet requires libsodium >= 1.0.18.])]) | ||
1085 | |||
1086 | # test for libextractor | ||
1087 | extractor=0 | ||
1088 | AC_MSG_CHECKING(for libextractor) | ||
1089 | AC_ARG_WITH(extractor, | ||
1090 | [ --with-extractor=PREFIX (base of libextractor installation)], | ||
1091 | [AC_MSG_RESULT([$with_extractor]) | ||
1092 | AS_CASE([$with_extractor], | ||
1093 | [no],[], | ||
1094 | [yes],[ | ||
1095 | AC_CHECK_HEADERS([extractor.h], | ||
1096 | AC_CHECK_LIB([extractor], [EXTRACTOR_plugin_add_defaults], | ||
1097 | extractor=1)) | ||
1098 | ],[ | ||
1099 | LDFLAGS="-L$with_extractor/lib $LDFLAGS" | ||
1100 | CPPFLAGS="-I$with_extractor/include $CPPFLAGS" | ||
1101 | AC_CHECK_HEADERS([extractor.h], | ||
1102 | AC_CHECK_LIB([extractor], [EXTRACTOR_plugin_add_defaults], | ||
1103 | EXT_LIB_PATH="-L$with_extractor/lib $EXT_LIB_PATH" | ||
1104 | extractor=1)) | ||
1105 | ]) | ||
1106 | ], | ||
1107 | [AC_MSG_RESULT([--with-extractor not specified]) | ||
1108 | AC_CHECK_HEADERS([extractor.h], | ||
1109 | AC_CHECK_LIB([extractor], [EXTRACTOR_plugin_add_defaults], | ||
1110 | extractor=1))]) | ||
1111 | # restore LIBS | ||
1112 | LIBS=$SAVE_LIBS | ||
1113 | 688 | ||
1114 | AS_IF([test "$extractor" != 1], | 689 | # check for libogg |
1115 | [ | 690 | CHECK_WITH_LIB([ogg], [ogg_stream_flush_fill], [ogg/ogg.h], [HAVE_OGG]) |
1116 | AM_CONDITIONAL(HAVE_LIBEXTRACTOR, false) | ||
1117 | AC_DEFINE([HAVE_LIBEXTRACTOR],[0],[Lacking libextractor]) | ||
1118 | ],[ | ||
1119 | AM_CONDITIONAL(HAVE_LIBEXTRACTOR, true) | ||
1120 | AC_DEFINE([HAVE_LIBEXTRACTOR],[1],[Have libextractor]) | ||
1121 | ]) | ||
1122 | |||
1123 | |||
1124 | # Check for libltdl header (#2999) | ||
1125 | ltdl=0 | ||
1126 | AC_MSG_CHECKING(for libltdl) | ||
1127 | AC_ARG_WITH(ltdl, | ||
1128 | [AS_HELP_STRING([--with-ltdl=PREFIX],[base of libltdl installation])], | ||
1129 | [AC_MSG_RESULT([$with_ltdl]) | ||
1130 | AS_CASE([$with_ltdl], | ||
1131 | [no],[], | ||
1132 | [yes],[ | ||
1133 | AC_CHECK_HEADERS(ltdl.h, | ||
1134 | AC_CHECK_LIB([ltdl], [lt_dlopenext], | ||
1135 | ltdl=1)) | ||
1136 | ],[ | ||
1137 | LDFLAGS="-L$with_ltdl/lib $LDFLAGS" | ||
1138 | CPPFLAGS="-I$with_ltdl/include $CPPFLAGS" | ||
1139 | AC_CHECK_HEADERS(ltdl.h, | ||
1140 | AC_CHECK_LIB([ltdl], [lt_dlopenext], | ||
1141 | EXT_LIB_PATH="-L$with_ltdl/lib $EXT_LIB_PATH" | ||
1142 | ltdl=1)) | ||
1143 | ]) | ||
1144 | ], | ||
1145 | [AC_MSG_RESULT([--with-ltdl not specified]) | ||
1146 | AC_CHECK_HEADERS(ltdl.h, | ||
1147 | AC_CHECK_LIB([ltdl], [lt_dlopenext], | ||
1148 | ltdl=1))]) | ||
1149 | AS_IF([test x$ltdl = x1], | ||
1150 | [ | ||
1151 | AC_MSG_RESULT([libltdl found]) | ||
1152 | ],[ | ||
1153 | AC_MSG_ERROR([GNUnet requires libltdl (from GNU libtool).]) | ||
1154 | ]) | ||
1155 | # restore LIBS | ||
1156 | LIBS=$SAVE_LIBS | ||
1157 | 691 | ||
1158 | # libidn and libidn2. The ideal goal is this: | 692 | PKG_CHECK_MODULES([GST], |
1159 | # check for libidn2, if it doesn't exist check for libidn | 693 | [glib-2.0 gobject-2.0 gstreamer-1.0 gstreamer-app-1.0 gstreamer-audio-1.0], |
1160 | # if both exist, prefer libidn2 | 694 | [gst=1], |
1161 | # if none exist, fail and message that libidn or libidn2 | 695 | [gst=0]) |
1162 | # is required with a preference for libidn2. | ||
1163 | # TODO: What we have right here can probably be improved. | ||
1164 | AC_MSG_CHECKING(for idn or idn2) | ||
1165 | |||
1166 | AC_MSG_CHECKING(for idn) | ||
1167 | my_with_libidn=1 | ||
1168 | AC_ARG_WITH(libidn, | ||
1169 | AS_HELP_STRING([--with-libidn=pathname], | ||
1170 | [Support IDN (needs libidn)]), | ||
1171 | [], | ||
1172 | [withval="yes"]) | ||
1173 | AS_IF([test x_$withval = x_yes], | ||
1174 | [AC_CHECK_HEADERS([idna.h], | ||
1175 | AC_MSG_NOTICE([Found idna.h]), | ||
1176 | AC_CHECK_HEADERS([idn/idna.h], | ||
1177 | AC_MSG_NOTICE([Found idn/idna.h]), | ||
1178 | my_with_libidn=0))], | ||
1179 | [AS_IF([test x_$withval != x_no], | ||
1180 | [CFLAGS="$CFLAGS -I$withval/include" | ||
1181 | LDFLAGS="$LDFLAGS -L$withval/lib" | ||
1182 | AC_CHECK_HEADERS([idna.h], | ||
1183 | AC_MSG_NOTICE([Found idna.h]), | ||
1184 | [AC_MSG_NOTICE([Failed to find idna.h]) | ||
1185 | my_with_libidn=0])], | ||
1186 | [my_with_libidn=0])]) | ||
1187 | |||
1188 | AC_MSG_CHECKING(for idn2) | ||
1189 | my_with_libidn2=1 | ||
1190 | AC_ARG_WITH(libidn2, | ||
1191 | AS_HELP_STRING([--with-libidn2=pathname], | ||
1192 | [Support IDN (needs libidn2)]), | ||
1193 | [], | ||
1194 | [withval="yes"]) | ||
1195 | AS_IF([test x_$withval = x_yes], | ||
1196 | [AC_CHECK_HEADERS([idn2.h], | ||
1197 | AC_MSG_NOTICE([Found idn2.h]), | ||
1198 | AC_CHECK_HEADERS([idn2/idn2.h], | ||
1199 | AC_MSG_NOTICE([Found idn2/idn2.h]), | ||
1200 | [AC_MSG_NOTICE([Failed to find idn2.h]) | ||
1201 | my_with_libidn2=0]))], | ||
1202 | [AS_IF([test x_$withval != x_no], | ||
1203 | [CFLAGS="$CFLAGS -I$withval/include" | ||
1204 | LDFLAGS="$LDFLAGS -L$withval/lib" | ||
1205 | AC_CHECK_HEADERS([idn2/idn2.h], | ||
1206 | AC_MSG_NOTICE([Found idn2/idn2.h]), | ||
1207 | [AC_MSG_NOTICE([Failed to find idn2.h]) | ||
1208 | my_with_libidn2=0])], | ||
1209 | [my_with_libidn2=0])]) | ||
1210 | |||
1211 | AC_MSG_CHECKING([if libidn can be used]) | ||
1212 | # Check for LIBIDNs | ||
1213 | there_can_only_be_one=1 | ||
1214 | |||
1215 | working_libidn1=0 | ||
1216 | working_libidn2=0 | ||
1217 | AS_IF([test x$my_with_libidn2 = x1], | ||
1218 | [AC_MSG_NOTICE([Checking for libidn2]) | ||
1219 | AC_CHECK_LIB([idn2], | ||
1220 | [idn2_to_unicode_8z8z], | ||
1221 | [working_libidn2=1 | ||
1222 | LIBS="-lidn2 $LIBS" | ||
1223 | AC_DEFINE_UNQUOTED([HAVE_LIBIDN2], | ||
1224 | [1], | ||
1225 | [Define to 1 if you have 'libidn2' (-lidn2).])], | ||
1226 | [MISSING_DEPS="${MISSING_DEPS}${MISSING_SEP}libidn2" | ||
1227 | MISSING_SEP=", "])]) | ||
1228 | AM_CONDITIONAL(HAVE_LIBIDN2, test x$working_libidn2 = x1) | ||
1229 | AS_IF([test x$working_libidn2 = x0], | ||
1230 | [AS_IF([test x$my_with_libidn = x1], | ||
1231 | [AC_MSG_NOTICE([Checking for libidn]) | ||
1232 | AC_CHECK_LIB([idn], | ||
1233 | [idna_to_ascii_8z], | ||
1234 | [working_libidn1=1 | ||
1235 | LIBS="-lidn $LIBS" | ||
1236 | AC_DEFINE_UNQUOTED([HAVE_LIBIDN], | ||
1237 | [1], | ||
1238 | [Define to 1 if you have 'libidn' (-lidn).])], | ||
1239 | [there_can_only_be_one=0])], | ||
1240 | [AS_IF([test x$my_with_libidn2 = x1], | ||
1241 | [there_can_only_be_one=0 | ||
1242 | AC_MSG_FAILURE([* There can only be one libidn. | ||
1243 | * Provide either libidn >= 1.13 | ||
1244 | * or | ||
1245 | * libidn2 to the configure | ||
1246 | * script via | ||
1247 | * --with-libidn2 | ||
1248 | * --with-libidn])])])]) | ||
1249 | AM_CONDITIONAL(HAVE_LIBIDN, test x$working_libidn1 = x1) | ||
1250 | |||
1251 | AS_IF([test "$working_libidn1" = 0 -a "$working_libidn2" = 0], | ||
1252 | [AC_MSG_ERROR([GNUnet requires libidn (or libidn2)])]) | ||
1253 | |||
1254 | AS_IF([test x$there_can_only_be_one = x0], | ||
1255 | [AC_MSG_FAILURE([Missing dependencies: $MISSING_DEPS])]) | ||
1256 | |||
1257 | # test for zlib | ||
1258 | SAVE_LDFLAGS=$LDFLAGS | ||
1259 | SAVE_CPPFLAGS=$CPPFLAGS | ||
1260 | AC_ARG_WITH(zlib, | ||
1261 | [ --with-zlib[[=DIR]] use libz in DIR], | ||
1262 | [AS_IF([test "$withval" = "no"], | ||
1263 | [AC_MSG_ERROR([GNUnet requires zlib])], | ||
1264 | [test "$withval" != "yes"], | ||
1265 | [Z_DIR=$withval | ||
1266 | CPPFLAGS="${CPPFLAGS} -I$withval/include" | ||
1267 | LDFLAGS="${LDFLAGS} -L$withval/lib"])]) | ||
1268 | AC_CHECK_HEADER(zlib.h, | ||
1269 | [], | ||
1270 | [AC_MSG_ERROR([GNUnet requires zlib])]) | ||
1271 | AC_CHECK_LIB(z, | ||
1272 | compress2, | ||
1273 | [AC_DEFINE([HAVE_ZLIB], | ||
1274 | [], | ||
1275 | [Have compression library]) | ||
1276 | if test "x${Z_DIR}" != "x"; then | ||
1277 | Z_CFLAGS="-I${Z_DIR}/include" | ||
1278 | Z_LIBS="-L${Z_DIR}/lib -lz" | ||
1279 | else | ||
1280 | Z_LIBS="-lz" | ||
1281 | fi], | ||
1282 | [AC_MSG_ERROR([GNUnet requires zlib])]) | ||
1283 | AC_SUBST(Z_CFLAGS) | ||
1284 | AC_SUBST(Z_LIBS) | ||
1285 | |||
1286 | AS_IF([test "$enable_shared" = "no"], | ||
1287 | [AC_MSG_ERROR([GNUnet only works with shared libraries. Sorry.])]) | ||
1288 | 696 | ||
697 | # check if conversation can be built and how | ||
698 | AC_MSG_CHECKING([for conversation feature set to build]) | ||
699 | AS_IF([test "x$pulse" != "x1" || test "x$opus" != "x1" || test "x$ogg" != "x1"], | ||
700 | [AS_IF([test "x$gst" != "x1"], | ||
701 | [conversation_backend="none" | ||
702 | AM_CONDITIONAL([BUILD_PULSE_HELPERS], [false]) | ||
703 | AM_CONDITIONAL([BUILD_GST_HELPERS], [false]) | ||
704 | AM_CONDITIONAL([BUILD_EXPERIMENTAL_HELPERS], [false])], | ||
705 | [conversation_backend="gst" | ||
706 | AM_CONDITIONAL([BUILD_PULSE_HELPERS], [false]) | ||
707 | AM_CONDITIONAL([BUILD_GST_HELPERS], [true]) | ||
708 | AM_CONDITIONAL([BUILD_EXPERIMENTAL_HELPERS], [false])])], | ||
709 | [conversation_backend="pulse" | ||
710 | AM_CONDITIONAL([BUILD_PULSE_HELPERS], [true]) | ||
711 | AM_CONDITIONAL([BUILD_GST_HELPERS], [false]) | ||
712 | AM_CONDITIONAL([BUILD_EXPERIMENTAL_HELPERS], [false])]) | ||
713 | |||
714 | AM_CONDITIONAL([BUILD_CONVERSATION], [test "x$conversation_backend" != "xnone"]) | ||
715 | AC_MSG_RESULT([$conversation_backend]) | ||
716 | |||
717 | # NOTE: If we find libcurl-gnutls here we set LIBCURL to -lcurl-gnutls | ||
718 | # This affects the LIBCURL_CHECK_CONFIG call below as it takes LIBCURL into | ||
719 | # account when checking for curl. | ||
720 | LIBCURL="-lcurl" | ||
721 | AC_CHECK_LIB([curl-gnutls], | ||
722 | [curl_easy_getinfo], | ||
723 | [LIBCURL="-lcurl-gnutls"]) | ||
724 | |||
725 | LIBCURL_CHECK_CONFIG([], [7.85.0], [], | ||
726 | [AC_MSG_ERROR([cURL must have a version >= 7.85.0])]) | ||
727 | |||
728 | OLD_LIBS=$LIBS | ||
729 | LIBS="$LIBS $LIBCURL" | ||
730 | AC_RUN_IFELSE( | ||
731 | [AC_LANG_PROGRAM([[#include <curl/curl.h>]], | ||
732 | [[return (CURLSSLSET_OK != curl_global_sslset(CURLSSLBACKEND_GNUTLS, NULL, NULL));]])], | ||
733 | [curl_gnutls=1], | ||
734 | [AC_MSG_WARN([cURL does not have GnuTLS backend]) | ||
735 | curl_gnutls=0]) | ||
736 | LIBS=$OLD_LIBS | ||
737 | AM_CONDITIONAL([HAVE_GNUTLS_CURL], [test "x$curl_gnutls" = "x1"]) | ||
738 | AC_SUBST([curl_gnutls]) | ||
739 | |||
740 | # Even if curl is found, we check for this constant in order to determine | ||
741 | # if we can use this feature. | ||
742 | AC_CHECK_HEADER([curl/curl.h], | ||
743 | [AC_CHECK_DECLS([CURLINFO_TLS_SSL_PTR], | ||
744 | [], | ||
745 | [AC_MSG_ERROR([cURL must support CURLINFO_TLS_SSL_PTR])], | ||
746 | [[#include <curl/curl.h>]])]) | ||
747 | # libatomic | ||
748 | AC_SEARCH_LIBS([__atomic_load_8], [atomic], | ||
749 | [have_libatomic=1 | ||
750 | AC_DEFINE([HAVE_LIBATOMIC], [1], | ||
751 | [Define to 1 if libatomic is external])]) | ||
752 | AM_CONDITIONAL([HAVE_LIBATOMIC], [test "x$have_libatomic" = "x1"]) | ||
753 | |||
754 | # check for nss | ||
755 | AC_CHECK_HEADERS([nss.h], [nss=true], [nss=false]) | ||
756 | AS_IF([test "x$nss" = "xfalse"], | ||
757 | [AM_CONDITIONAL([HAVE_GLIBCNSS], [false]) | ||
758 | AC_MSG_WARN([NSS plugin will not be build])], | ||
759 | [AC_CHECK_DECL([NSS_STATUS_UNAVAIL], | ||
760 | [AM_CONDITIONAL([HAVE_GLIBCNSS], [true])], | ||
761 | [AM_CONDITIONAL([HAVE_GLIBCNSS], [false]) | ||
762 | AC_MSG_WARN([NSS plugin will not be built])], | ||
763 | [[#include <nss.h>]])]) | ||
1289 | 764 | ||
1290 | # restore LIBS | 765 | # test for kvm and kstat (for CPU stats under BSD/Solaris) |
1291 | LIBS=$SAVE_LIBS | 766 | AC_CHECK_LIB([kvm], [kvm_open]) |
767 | AC_CHECK_LIB([kstat], [kstat_open]) | ||
1292 | 768 | ||
769 | # check for libsodium version >= 1.0.18 | ||
770 | libsodium=0 | ||
771 | CHECK_WITH_LIB([sodium], [crypto_core_ed25519_scalar_mul], [sodium.h], [HAVE_SODIUM]) | ||
772 | AS_IF([test "x$sodium" = "x0"], | ||
773 | [AC_MSG_ERROR([GNUnet requires libsodium >= 1.0.18])]) | ||
774 | |||
775 | # check for libextractor | ||
776 | CHECK_WITH_LIB([extractor], | ||
777 | [EXTRACTOR_plugin_add_defaults], | ||
778 | [extractor.h], | ||
779 | [HAVE_LIBEXTRACTOR]) | ||
780 | AS_IF([test "x$extractor" = "x0"], | ||
781 | [AC_MSG_RESULT([GNU libextractor not found, some features disabled])]) | ||
782 | |||
783 | # check for cloudflare-quiche | ||
784 | CHECK_WITH_LIB([quiche], | ||
785 | [quiche_header_info], | ||
786 | [quiche.h], | ||
787 | [HAVE_QUICHE]) | ||
788 | AS_IF([test "x$quiche" = "x0"], | ||
789 | [AC_MSG_RESULT([cloudflare-quiche not found, some features disabled])]) | ||
790 | |||
791 | # check for libltdl | ||
792 | CHECK_WITH_LIB([ltdl], [lt_dlopenext], [ltdl.h], [HAVE_LTDL]) | ||
793 | AS_IF([test "x$ldtl" = "x0"], | ||
794 | [AC_MSG_RESULT([libltdl (from GNU libtool) is required])]) | ||
795 | |||
796 | # check for libidn, first version 2 and if not found, version 1 | ||
797 | # if both are missing throw an error as libidn is required | ||
798 | AC_ARG_WITH([libidn], | ||
799 | [AS_HELP_STRING([--with-libidn=PFX], [base of libidn/libidn2 installation])], | ||
800 | [libidn=${withval}], | ||
801 | [libidn=yes]) | ||
802 | |||
803 | AS_IF([test "x$libidn" = "xno"], | ||
804 | [AC_MSG_ERROR([GNUnet requires libidn or libidn2])]) | ||
805 | |||
806 | AS_IF([test "x$libidn" = "xyes"], | ||
807 | [AC_CHECK_HEADERS([idn2.h], | ||
808 | [libidn_version="2"], | ||
809 | [AC_CHECK_HEADERS([idn2/idn2.h], | ||
810 | [libidn_version="2"], | ||
811 | [libidn_version="0"])])], | ||
812 | [LDFLAGS="-L$libidn/lib $LDFLAGS" | ||
813 | CPPFLAGS="-I$libidn/include $CPPFLAGS" | ||
814 | AC_CHECK_HEADERS([idn2.h], | ||
815 | [libidn_version="2"], | ||
816 | [AC_CHECK_HEADERS([idn2/idn2.h], | ||
817 | [libidn_version="2"], | ||
818 | [libidn_version="0"])])]) | ||
819 | |||
820 | AS_IF([test "x$libidn_version" = "x0"], | ||
821 | [AS_IF([test "x$libidn" = "xyes"], | ||
822 | [AC_CHECK_HEADERS([idna.h], | ||
823 | [libidn_version="1"], | ||
824 | [AC_CHECK_HEADERS([idn/idna.h], | ||
825 | [libidn_version="1"] | ||
826 | [libidn_version="2"])])], | ||
827 | [LDFLAGS="-L$libidn/lib $LDFLAGS" | ||
828 | CPPFLAGS="-I$libidn/include $CPPFLAGS" | ||
829 | AC_CHECK_HEADERS([idna.h], | ||
830 | [libidn_version="2"], | ||
831 | [AC_CHECK_HEADERS([idn/idna.h], | ||
832 | [libidn_version="2"], | ||
833 | [libidn_version="0"])])])]) | ||
834 | |||
835 | AS_IF([test "x$libidn_version" = "x0"], | ||
836 | [AC_MSG_ERROR([GNUnet requires libidn or libidn2])]) | ||
837 | |||
838 | AS_IF([test "x$libidn_version" = "x2"], | ||
839 | [AC_CHECK_LIB([idn2], [idn2_to_unicode_8z8z], [libidn_ok=yes], [libidn_ok=no])], | ||
840 | [AC_CHECK_LIB([idn], [idna_to_ascii_8z], [libidn_ok=yes], [libidn_ok=no])]) | ||
841 | |||
842 | AS_IF([test "x$libidn_ok" = "xno"], | ||
843 | [AC_MSG_ERROR([GNUnet requires libidn or libidn2])]) | ||
844 | |||
845 | AM_CONDITIONAL([HAVE_LIBIDN], [test "x$libidn_version" = "x1"]) | ||
846 | AM_CONDITIONAL([HAVE_LIBIDN2], [test "x$libidn_version" = "x2"]) | ||
847 | AS_IF([test "x$libidn_version" = "x2"], | ||
848 | [AC_DEFINE([HAVE_LIBIDN2], [1], [Define to 1 if libidn2 is available])], | ||
849 | [AC_DEFINE([HAVE_LIBIDN], [1], [Define to 1 if libidn is available])]) | ||
850 | |||
851 | # check for zlib | ||
852 | AC_ARG_WITH([zlib], | ||
853 | [AS_HELP_STRING([--with-zlib=PFX], [base of zlib installation])], | ||
854 | [zlib=${withval}], | ||
855 | [zlib=yes]) | ||
856 | |||
857 | AS_IF([test "x$zlib" = "xno"], [AC_MSG_ERROR([GNUnet requires zlib])]) | ||
858 | |||
859 | AS_IF([test "x$zlib" = "xyes"], | ||
860 | [AC_CHECK_HEADER([zlib.h], | ||
861 | [AC_CHECK_LIB([z], [compress2], [zlib_ok=1], [zlib_ok=0])], | ||
862 | [zlib_ok=0])], | ||
863 | [LDFLAGS="-L$zlib/lib $LDFLAGS" | ||
864 | CPPFLAGS="-I$zlib/include $CPPFLAGS" | ||
865 | AC_CHECK_HEADER([zlib.h], | ||
866 | [AC_CHECK_LIB([z], [compress2], [zlib_ok=1], [zlib_ok=0])], | ||
867 | [zlib_ok=0])]) | ||
868 | |||
869 | AS_IF([test "x$zlib_ok" = "x0"], [AC_MSG_ERROR([GNUnet requires zlib])]) | ||
870 | AS_IF([test "x$zlib" = "xyes"], | ||
871 | [Z_CFLAGS="" | ||
872 | Z_LIBS="-lz"], | ||
873 | [Z_CFLAGS="-I${zlib}/include" | ||
874 | Z_LIBS="-L${zlib}/lib -lz"]) | ||
875 | AC_SUBST([Z_CFLAGS]) | ||
876 | AC_SUBST([Z_LIBS]) | ||
877 | |||
878 | AM_CONDITIONAL([HAVE_ZLIB], [test "x$zlib_ok" = "x1"]) | ||
879 | AC_DEFINE_UNQUOTED([HAVE_ZLIB], [$zlib_ok], [Define to 1 if zlib is available]) | ||
1293 | 880 | ||
1294 | # check for iconv | 881 | # check for iconv |
1295 | AM_ICONV | 882 | AM_ICONV |
1296 | 883 | ||
1297 | # test for libunistring | 884 | # check for libunistring |
1298 | gl_LIBUNISTRING | 885 | CHECK_WITH_LIB([unistring], [u16_strstr], [unistr.h], [HAVE_UNISTRING]) |
1299 | AS_IF([test $HAVE_LIBUNISTRING != yes], | 886 | AS_IF([test "x$unistring" = "x0"], |
1300 | [AC_MSG_ERROR([GNUnet requires libunistring])]) | 887 | [AC_MSG_ERROR([GNUnet requires unistring])]) |
1301 | 888 | ||
1302 | # Currently broken on Debian :-( | 889 | # Currently broken on Debian :-( |
1303 | #AS_VERSION_COMPARE([$LIBUNISTRING_VERSION],[0.9.1.1], | 890 | # AS_VERSION_COMPARE([$LIBUNISTRING_VERSION], [0.9.1.1], |
1304 | # [AC_MSG_ERROR([GNUnet requires libunistring >= 0.9.1.1, found $LIBUNISTRING_VERSION])]) | 891 | # [AC_MSG_ERROR([GNUnet requires libunistring >= 0.9.1.1, found $LIBUNISTRING_VERSION])], |
1305 | 892 | # [AC_MSG_ERROR([GNUnet requires libunistring >= 0.9.1.1, found $LIBUNISTRING_VERSION])]) | |
1306 | AC_CHECK_HEADERS([unistr.h], | 893 | |
1307 | , | 894 | # check for sqlite |
1308 | AC_MSG_ERROR([Compiling GNUnet requires unistr.h (from libunistring) to be installed])) | 895 | CHECK_WITH_LIB([sqlite3], [sqlite3_open], [sqlite3.h], [HAVE_SQLITE]) |
896 | |||
897 | # check for postgres | ||
898 | AX_LIB_POSTGRESQL([12.0], [postgres=1], [postgres=0]) | ||
899 | AS_IF([test "x$postgres" = "x1"], | ||
900 | [SAVE_CPPFLAGS="$CPPFLAGS" | ||
901 | CPPFLAGS="$POSTGRES_CPPFLAGS $CPPFLAGS" | ||
902 | AC_CHECK_HEADERS([libpq-fe.h], [postgres=1], [postgres=0])]) | ||
903 | AM_CONDITIONAL([HAVE_POSTGRESQL], [test "x$postgres" = "x1"]) | ||
904 | AC_DEFINE_UNQUOTED([HAVE_POSTGRESQL], [$postgres], | ||
905 | [Define to 1 if Postgres is available]) | ||
906 | |||
907 | CPPFLAGS="$SAVE_CPPFLAGS" | ||
908 | |||
909 | # check for libmicrohttpd | ||
910 | AC_ARG_WITH([microhttpd], | ||
911 | [AS_HELP_STRING([--with-microhttpd=PFX], | ||
912 | [base of libmicrohttpd installation])], | ||
913 | [SAVE_PKG_PATH="$PKG_CONFIG_PATH" | ||
914 | PKG_CONFIG_PATH="${withval}/lib/pkgconfig" | ||
915 | export PKG_CONFIG_PATH | ||
916 | PKG_CHECK_MODULES([MHD], [libmicrohttpd >= 0.9.63], [libmhd=1], [libmhd=0]) | ||
917 | PKG_CONFIG_PATH="$SAVE_PKG_PATH"], | ||
918 | [PKG_CHECK_MODULES([MHD], [libmicrohttpd >= 0.9.63], [libmhd=1], [libmhd=0])]) | ||
919 | |||
920 | AS_IF([test "x$libmhd" = "x0"], | ||
921 | [AC_MSG_ERROR([GNUnet requires libmicrohttpd >= 0.9.63])]) | ||
922 | |||
923 | AM_CONDITIONAL([HAVE_MHD], [test "x$libmhd" = "x1"]) | ||
924 | AC_DEFINE_UNQUOTED([HAVE_MHD], [$libmhd], | ||
925 | [Define to 1 if libmicrohttpd is available]) | ||
926 | AM_CONDITIONAL([HAVE_REST], [true]) | ||
927 | |||
928 | # check for gnutls | ||
929 | AC_ARG_WITH([gnutls], | ||
930 | [AS_HELP_STRING([--with-gnutls=PFX], [base of gnutls installation])], | ||
931 | [AS_CASE([$with_gnutls], | ||
932 | [no], | ||
933 | [gnutls=0], | ||
934 | [yes], | ||
935 | [AC_CHECK_HEADERS([gnutls/abstract.h], | ||
936 | [AC_CHECK_LIB([gnutls], [gnutls_priority_set], | ||
937 | [gnutls=1], [gnutls=0])], | ||
938 | [gnutls=0]) | ||
939 | AC_CHECK_HEADERS([gnutls/dane.h], | ||
940 | [AC_CHECK_LIB([gnutls-dane], [dane_verify_crt_raw], | ||
941 | [gnutls_dane=1], [gnutls_dane=0])], | ||
942 | [gnutls_dane=0])], | ||
943 | [LDFLAGS="-L$with_gnutls/lib $LDFLAGS" | ||
944 | CPPFLAGS="-I$with_gnutls/include $CPPFLAGS" | ||
945 | AC_CHECK_HEADERS([gnutls/abstract.h], | ||
946 | [AC_CHECK_LIB([gnutls], [gnutls_priority_set], | ||
947 | [gnutls=1], [gnutls=0])], | ||
948 | [gnutls=0]) | ||
949 | AC_CHECK_HEADERS([gnutls/dane.h], | ||
950 | [AC_CHECK_LIB([gnutls-dane], [dane_verify_crt_raw], | ||
951 | [gnutls_dane=1], [gnutls_dane=0])], | ||
952 | [gnutls_dane=0])])], | ||
953 | [AC_CHECK_HEADERS([gnutls/abstract.h], | ||
954 | [AC_CHECK_LIB([gnutls], [gnutls_priority_set], | ||
955 | [gnutls=1], [gnutls=0])], | ||
956 | [gnutls=0]) | ||
957 | AC_CHECK_HEADERS([gnutls/dane.h], | ||
958 | [AC_CHECK_LIB([gnutls-dane], [dane_verify_crt_raw], | ||
959 | [gnutls_dane=1], [gnutls_dane=0])], | ||
960 | [gnutls_dane=0])]) | ||
961 | AM_CONDITIONAL([HAVE_GNUTLS], [test "x$gnutls" = "x1"]) | ||
962 | AM_CONDITIONAL([HAVE_GNUTLS_DANE], [test "x$gnutls_dane" = "x1"]) | ||
963 | AC_DEFINE_UNQUOTED([HAVE_GNUTLS], [$gnutls], [Define to 1 if GnuTLS is available]) | ||
964 | AC_DEFINE_UNQUOTED([HAVE_GNUTLS_DANE], [$gnutls_dane], | ||
965 | [Define to 1 if GnuTLS has DANE support]) | ||
1309 | 966 | ||
1310 | # restore LIBS | 967 | # restore LIBS |
1311 | LIBS=$SAVE_LIBS | 968 | LIBS=$SAVE_LIBS |
1312 | 969 | ||
1313 | 970 | # Check for standard header files. | |
1314 | |||
1315 | # Checks for standard header files. | ||
1316 | AC_HEADER_DIRENT | 971 | AC_HEADER_DIRENT |
1317 | 972 | ||
1318 | # Check for headers that are ALWAYS required | 973 | # Check for headers that are ALWAYS required |
1319 | AC_CHECK_HEADERS([fcntl.h math.h errno.h ctype.h limits.h stdio.h stdlib.h string.h unistd.h stdarg.h signal.h locale.h sys/stat.h sys/types.h],,AC_MSG_ERROR([Compiling GNUnet requires standard UNIX headers files: fcntl.h math.h errno.h ctype.h limits.h stdio.h stdlib.h string.h unistd.h stdarg.h signal.h locale.h sys/stat.h sys/types.h])) | 974 | # It's assumed that AC_INCLUDES_DEFAULT has been executed already, as that |
1320 | 975 | # makes sure the most common headers (e.g. stdlib.h) are available | |
1321 | 976 | AC_CHECK_HEADERS([fcntl.h math.h errno.h ctype.h limits.h stdarg.h signal.h locale.h], | |
1322 | 977 | [], | |
1323 | # Checks for headers that are only required on some systems or | 978 | [AC_MSG_ERROR([Compiling GNUnet requires standard UNIX header files])]) |
1324 | # opional (and where we do NOT abort if they are not there) | 979 | |
1325 | AC_CHECK_HEADERS([stdatomic.h malloc.h malloc/malloc.h malloc/malloc_np.h langinfo.h sys/param.h sys/mount.h sys/statvfs.h sys/select.h sockLib.h sys/mman.h sys/msg.h sys/vfs.h arpa/inet.h fcntl.h libintl.h netdb.h netinet/in.h sys/ioctl.h sys/socket.h sys/time.h unistd.h kstat.h sys/sysinfo.h kvm.h sys/file.h sys/resource.h ifaddrs.h mach/mach.h stddef.h sys/timeb.h argz.h ucred.h sys/ucred.h endian.h sys/endian.h execinfo.h byteswap.h]) | 980 | # Check for headers required only on some systems or which are optional |
1326 | 981 | AC_CHECK_HEADERS([stdatomic.h malloc.h malloc/malloc.h malloc/malloc_np.h langinfo.h sys/param.h sys/mount.h sys/statvfs.h sys/select.h sockLib.h sys/mman.h sys/msg.h sys/vfs.h arpa/inet.h libintl.h netdb.h netinet/in.h sys/ioctl.h sys/socket.h sys/time.h sys/sysinfo.h sys/file.h sys/resource.h ifaddrs.h mach/mach.h sys/timeb.h argz.h ucred.h sys/ucred.h endian.h sys/endian.h execinfo.h byteswap.h]) | |
1327 | # FreeBSD requires this for netinet/in_systm.h and netinet/ip.h | 982 | |
1328 | AC_CHECK_HEADERS([sys/types.h netinet/in_systm.h netinet/in.h netinet/ip.h],,, | 983 | # Required for FreeBSD's netinet/in_systm.h and netinet/ip.h |
1329 | [#ifdef HAVE_SYS_TYPES_H | 984 | AS_IF([test "x$build_target" = "xfreebsd"], |
1330 | #include <sys/types.h> | 985 | [AC_CHECK_HEADERS([sys/types.h netinet/in_systm.h netinet/in.h, netinet/ip.h], |
986 | [], [], | ||
987 | [#ifdef HAVE_SYS_TYPES_H | ||
988 | #include <sys/type.h> | ||
1331 | #endif | 989 | #endif |
1332 | #ifdef HAVE_NETINET_IN_SYSTM_H | 990 | #ifdef HAVE_NETINET_IN_SYSTM_H |
1333 | #include <netinet/in_systm.h> | 991 | #include <netinet/in_systm.h> |
@@ -1335,574 +993,229 @@ AC_CHECK_HEADERS([sys/types.h netinet/in_systm.h netinet/in.h netinet/ip.h],,, | |||
1335 | #ifdef HAVE_NETINET_IN_H | 993 | #ifdef HAVE_NETINET_IN_H |
1336 | #include <netinet/in.h> | 994 | #include <netinet/in.h> |
1337 | #endif | 995 | #endif |
1338 | ]) | 996 | ])]) |
1339 | |||
1340 | SAVE_LDFLAGS=$LDFLAGS | ||
1341 | SAVE_CPPFLAGS=$CPPFLAGS | ||
1342 | |||
1343 | # test for sqlite | ||
1344 | sqlite=false | ||
1345 | AC_MSG_CHECKING(for SQLite) | ||
1346 | AC_ARG_WITH(sqlite, | ||
1347 | [ --with-sqlite=PFX base of SQLite installation], | ||
1348 | [AC_MSG_RESULT("$with_sqlite") | ||
1349 | AS_CASE([$with_sqlite], | ||
1350 | [no],[], | ||
1351 | [yes],[ | ||
1352 | AC_CHECK_HEADERS(sqlite3.h, | ||
1353 | sqlite=true)], | ||
1354 | [ | ||
1355 | LDFLAGS="-L$with_sqlite/lib $LDFLAGS" | ||
1356 | CPPFLAGS="-I$with_sqlite/include $CPPFLAGS" | ||
1357 | AC_CHECK_HEADERS(sqlite3.h, | ||
1358 | EXT_LIB_PATH="-L$with_sqlite/lib $EXT_LIB_PATH" | ||
1359 | SQLITE_LDFLAGS="-L$with_sqlite/lib" | ||
1360 | SQLITE_CPPFLAGS="-I$with_sqlite/include" | ||
1361 | sqlite=true) | ||
1362 | LDFLAGS=$SAVE_LDFLAGS | ||
1363 | CPPFLAGS=$SAVE_CPPFLAGS | ||
1364 | ]) | ||
1365 | ], | ||
1366 | [AC_MSG_RESULT([--with-sqlite not specified]) | ||
1367 | AC_CHECK_HEADERS(sqlite3.h, sqlite=true)]) | ||
1368 | AM_CONDITIONAL(HAVE_SQLITE, test x$sqlite = xtrue) | ||
1369 | AC_SUBST(SQLITE_CPPFLAGS) | ||
1370 | AC_SUBST(SQLITE_LDFLAGS) | ||
1371 | |||
1372 | LDFLAGS=$SAVE_LDFLAGS | ||
1373 | CPPFLAGS=$SAVE_CPPFLAGS | ||
1374 | |||
1375 | # test for postgres: | ||
1376 | postgres=false | ||
1377 | AX_LIB_POSTGRESQL([12.0], | ||
1378 | [CPPFLAGS="$CPPFLAGS $POSTGRESQL_CPPFLAGS" | ||
1379 | AC_CHECK_HEADERS([libpq-fe.h], | ||
1380 | postgres=true) | ||
1381 | ], | ||
1382 | [AC_MSG_RESULT([no postgres])]) | ||
1383 | |||
1384 | AM_CONDITIONAL(HAVE_POSTGRESQL, test x$postgres = xtrue) | ||
1385 | AS_IF([test "x$postgres" = xtrue], | ||
1386 | [AC_DEFINE([HAVE_POSTGRESQL],[1],[Have PostgreSQL])], | ||
1387 | [AC_DEFINE([HAVE_POSTGRESQL],[0],[Lacking PostgreSQL])]) | ||
1388 | |||
1389 | LDFLAGS=$SAVE_LDFLAGS | ||
1390 | CPPFLAGS=$SAVE_CPPFLAGS | ||
1391 | |||
1392 | # mysql & windows | ||
1393 | AC_CHECK_TYPES([sigset_t, off_t], [], [], [#include <sys/types.h>]) | ||
1394 | AC_CHECK_TYPES([size_t], [], [], [#include <stdio.h>]) | ||
1395 | |||
1396 | # test for mysql | ||
1397 | mysql=false | ||
1398 | mysqlfail=false | ||
1399 | SAVE_LDFLAGS=$LDFLAGS | ||
1400 | SAVE_CPPFLAGS=$CPPFLAGS | ||
1401 | AC_MSG_CHECKING(for mysql) | ||
1402 | AC_ARG_WITH(mysql, | ||
1403 | [ --with-mysql=PFX base of MySQL installation], | ||
1404 | [AC_MSG_RESULT([$with_mysql]) | ||
1405 | AS_CASE([$with_mysql], | ||
1406 | [no],[], | ||
1407 | [yes|""],[ | ||
1408 | AC_CHECK_HEADERS(mysql/mysql.h, | ||
1409 | AC_CHECK_LIB(mysqlclient, mysql_init, | ||
1410 | mysql=true), [], []) | ||
1411 | ],[ | ||
1412 | LDFLAGS="-L$with_mysql/lib -L$with_mysql/lib/mysql $LDFLAGS $ZLIBS" | ||
1413 | CPPFLAGS="-I$with_mysql/include $CPPFLAGS" | ||
1414 | AC_CHECK_HEADERS(mysql/mysql.h, | ||
1415 | AC_CHECK_LIB(mysqlclient, mysql_init, | ||
1416 | MYSQL_LDFLAGS="-L$with_mysql/lib -L$with_mysql/lib/mysql" | ||
1417 | MYSQL_CPPFLAGS="-I$with_mysql/include" | ||
1418 | |||
1419 | mysql=true), [], []) | ||
1420 | ]) | ||
1421 | ], | ||
1422 | [AC_MSG_RESULT([--with-mysql not specified]) | ||
1423 | if test -d "/usr/lib64/mysql"; then | ||
1424 | MYSQL_LIBDIR="/usr/lib64/mysql" | ||
1425 | elif test -d "/usr/lib/mysql"; then | ||
1426 | MYSQL_LIBDIR="/usr/lib/mysql" | ||
1427 | else | ||
1428 | MYSQL_LIBDIR="/usr/lib" | ||
1429 | fi | ||
1430 | LDFLAGS="-L$MYSQL_LIBDIR $LDFLAGS $ZLIBS" | ||
1431 | AC_CHECK_LIB(mysqlclient, mysql_init, | ||
1432 | [AC_CHECK_HEADERS(mysql/mysql.h, | ||
1433 | MYSQL_LDFLAGS="-L$MYSQL_LIBDIR" | ||
1434 | mysql=true | ||
1435 | |||
1436 | , [], [])]) | ||
1437 | ]) | ||
1438 | |||
1439 | AC_SUBST(MYSQL_LDFLAGS) | ||
1440 | AC_SUBST(MYSQL_CPPFLAGS) | ||
1441 | |||
1442 | # additional version check for mysql | ||
1443 | AC_ARG_ENABLE(mysql-version-check, [ --disable-mysql-version-check do not check MySQL version],, enable_mysql_version_check=yes) | ||
1444 | AS_IF([test "$mysql" = "true" -a "x$enable_mysql_version_check" = "xyes"], | ||
1445 | [ | ||
1446 | AC_MSG_CHECKING(mysql version) | ||
1447 | AC_COMPILE_IFELSE([AC_LANG_PROGRAM( | ||
1448 | [[ | ||
1449 | #include <mysql/mysql_version.h>]], | ||
1450 | [[ | ||
1451 | #if (MYSQL_VERSION_ID < 40100) | ||
1452 | #error needs at least version >= 4.1 | ||
1453 | #endif | ||
1454 | ]]) | ||
1455 | ], | ||
1456 | [mysql=true], | ||
1457 | [mysql=false]) | ||
1458 | AS_IF([test x$mysql = xfalse], | ||
1459 | [ | ||
1460 | mysqlfail=true | ||
1461 | AC_MSG_WARN([fail, MySQL >= 4.1 required]) | ||
1462 | ],[ | ||
1463 | AC_MSG_NOTICE([success, will keep $mysqlfail]) | ||
1464 | mysqlfail=false | ||
1465 | AC_MSG_RESULT(ok) | ||
1466 | ]) | ||
1467 | AC_COMPILE_IFELSE([AC_LANG_PROGRAM( | ||
1468 | [[ | ||
1469 | #include <mysql/mysql_version.h>]], | ||
1470 | [[ | ||
1471 | #if (MYSQL_VERSION_ID < 80000) | ||
1472 | #error needs at least version >= 4.1 | ||
1473 | #endif | ||
1474 | ]]) | ||
1475 | ], | ||
1476 | [mysql8=true], | ||
1477 | [mysql8=false]) | ||
1478 | AS_IF([test x$mysql8 = xtrue], | ||
1479 | [ | ||
1480 | AC_DEFINE([HAVE_MYSQL8],[1],[Have mysql8]) | ||
1481 | ],[]) | ||
1482 | ]) | ||
1483 | |||
1484 | AM_CONDITIONAL(HAVE_MYSQL, test x$mysql = xtrue) | ||
1485 | AM_CONDITIONAL(HAVE_MYSQLE, false) | ||
1486 | # restore LIBS | ||
1487 | LIBS=$SAVE_LIBS | ||
1488 | LDFLAGS=$SAVE_LDFLAGS | ||
1489 | CPPFLAGS=$SAVE_CPPFLAGS | ||
1490 | |||
1491 | # TODO: should this test for "or" not "and"? | ||
1492 | # TODO: Add postgres? | ||
1493 | AS_IF([test "$sqlite" = 0 -a "$mysql" = 0], | ||
1494 | [ | ||
1495 | AC_MSG_ERROR([GNUnet requires SQLite or MySQL / MariaDB.]) | ||
1496 | ]) | ||
1497 | |||
1498 | # libmicrohttpd | ||
1499 | lmhd=0 | ||
1500 | m4_define([MHD_MODULE], [libmicrohttpd >= 0.9.63]) | ||
1501 | AC_ARG_WITH(microhttpd, | ||
1502 | [AS_HELP_STRING([--with-microhttpd[[=PFX]]], | ||
1503 | [base of libmicrohttpd installation])], | ||
1504 | [], | ||
1505 | [with_microhttpd=check]) | ||
1506 | AS_CASE([$with_microhttpd], | ||
1507 | [no], [], | ||
1508 | [yes], [PKG_CHECK_MODULES([MHD], [MHD_MODULE], [lmhd=1])], | ||
1509 | [check], [PKG_CHECK_MODULES([MHD], [MHD_MODULE], | ||
1510 | [lmhd=1], | ||
1511 | [AC_MSG_WARN([Building without libmicrohttpd])])], | ||
1512 | [SAVE_PKG_CONFIG_PATH=$PKG_CONFIG_PATH | ||
1513 | PKG_CONFIG_PATH=$with_microhttpd/lib/pkgconfig | ||
1514 | export PKG_CONFIG_PATH | ||
1515 | PKG_CHECK_MODULES([MHD], [MHD_MODULE], [lmhd=1]) | ||
1516 | PKG_CONFIG_PATH=$SAVE_PKG_CONFIG_PATH]) | ||
1517 | AM_CONDITIONAL(HAVE_MHD, test x$lmhd = x1) | ||
1518 | AC_DEFINE_UNQUOTED([HAVE_MHD], $lmhd, [We have libmicrohttpd]) | ||
1519 | |||
1520 | AM_CONDITIONAL(HAVE_JSON, [test x$jansson = x1]) | ||
1521 | AM_CONDITIONAL(HAVE_REST, [test x$jansson = x1 -a x$lmhd = x1]) | ||
1522 | AS_IF([test "x$lmhd" != "x1"], | ||
1523 | [AC_MSG_ERROR([GNUnet requires libmicrohttpd >= 0.9.63.])]) | ||
1524 | |||
1525 | |||
1526 | # restore LIBS | ||
1527 | LIBS=$SAVE_LIBS | ||
1528 | 997 | ||
1529 | # check for gettext | 998 | # check for gettext |
1530 | AM_GNU_GETTEXT([external]) | 999 | AM_GNU_GETTEXT([external]) |
1531 | AM_GNU_GETTEXT_VERSION([0.18.1]) | 1000 | AM_GNU_GETTEXT_VERSION([0.18.1]) |
1532 | 1001 | ||
1533 | # Checks for standard typedefs, structures, and compiler characteristics. | 1002 | # check for stantard typedefs, structures and compiler characteristics |
1534 | AC_TYPE_PID_T | 1003 | AC_TYPE_PID_T |
1535 | AC_TYPE_SIZE_T | 1004 | AC_TYPE_SIZE_T |
1536 | AC_TYPE_MODE_T | 1005 | AC_TYPE_MODE_T |
1537 | AC_CHECK_HEADERS_ONCE([sys/time.h]) | ||
1538 | 1006 | ||
1539 | AC_HEADER_STAT | 1007 | AC_HEADER_STAT |
1540 | AC_HEADER_STDBOOL | 1008 | AC_HEADER_STDBOOL |
1541 | AC_STRUCT_TM | 1009 | AC_STRUCT_TM |
1542 | 1010 | ||
1543 | AC_CHECK_MEMBER([struct sockaddr_in.sin_len], | 1011 | AC_CHECK_MEMBER([struct sockaddr_in.sin_len], |
1544 | [ AC_DEFINE(HAVE_SOCKADDR_IN_SIN_LEN, 1, [Do we have sockaddr_in.sin_len?]) | 1012 | [AC_DEFINE([HAVE_SOCKADDR_IN_SIN_LEN], [1], |
1545 | ], | 1013 | [Define to 1 if struct sockaddr_in has sin_len field])], |
1546 | [], | 1014 | [], [], |
1547 | [ | 1015 | [#include <sys/types.h> |
1548 | #include <sys/types.h> | 1016 | #include <sys/socket.h> |
1549 | #include <sys/socket.h> | 1017 | #include <netinet/in.h>]) |
1550 | #include <netinet/in.h> | ||
1551 | ]) | ||
1552 | 1018 | ||
1553 | AC_CHECK_MEMBER([struct sockaddr_un.sun_len], | 1019 | AC_CHECK_MEMBER([struct sockaddr_un.sun_len], |
1554 | [ AC_DEFINE(HAVE_SOCKADDR_UN_SUN_LEN, | 1020 | [AC_DEFINE([HAVE_SOCKADDR_UN_SUN_LEN], [1], |
1555 | 1, | 1021 | [Define to 1 if struct sockaddr_un has sun_len field])], |
1556 | [Do we have sockaddr_un.sun_len?])], | 1022 | [], [], |
1557 | [], | 1023 | [#include <sys/types.h> |
1558 | [ | 1024 | #include <sys/socket.h> |
1559 | #include <sys/types.h> | 1025 | #include <sys/un.h>]) |
1560 | #include <sys/socket.h> | ||
1561 | #include <sys/un.h> | ||
1562 | ]) | ||
1563 | |||
1564 | 1026 | ||
1565 | |||
1566 | # Checks for library functions. | ||
1567 | AC_FUNC_CLOSEDIR_VOID | ||
1568 | AC_FUNC_FORK | ||
1569 | AC_PROG_GCC_TRADITIONAL | ||
1570 | AC_FUNC_MEMCMP | ||
1571 | AC_FUNC_SELECT_ARGTYPES | ||
1572 | AC_FUNC_CHOWN | ||
1573 | |||
1574 | AC_FUNC_STAT | ||
1575 | AC_FUNC_STRFTIME | ||
1576 | AC_FUNC_VPRINTF | ||
1577 | AC_HEADER_SYS_WAIT | ||
1578 | AC_TYPE_OFF_T | 1027 | AC_TYPE_OFF_T |
1579 | AC_TYPE_UID_T | 1028 | AC_TYPE_UID_T |
1580 | AC_CHECK_FUNCS([atoll stat64 strnlen mremap getrlimit setrlimit sysconf initgroups strndup gethostbyname2 getpeerucred getpeereid setresuid $funcstocheck getifaddrs freeifaddrs getresgid mallinfo malloc_size malloc_usable_size getrusage random srandom stat statfs statvfs wait4 timegm]) | ||
1581 | 1029 | ||
1582 | # restore LIBS | 1030 | # check for library functions |
1583 | LIBS=$SAVE_LIBS | 1031 | AC_FUNC_FORK |
1032 | AC_FUNC_CHOWN | ||
1033 | AC_CHECK_FUNCS([atoll stat64 strnlen mremap getrlimit setrlimit sysconf initgroups strndup gethostbyname2 getpeerucred getpeereid setresuid getifaddrs freeifaddrs getresgid mallinfo2 malloc_size malloc_usable_size getrusage random srandom stat statfs statvfs wait4 timegm]) | ||
1584 | 1034 | ||
1585 | GN_INTLINCL="" | 1035 | GN_INTLINCL="" |
1586 | GN_LIBINTL="$LTLIBINTL" | 1036 | GN_LIBINTL="$LTLIBINTL" |
1587 | GN_LIB_LDFLAGS="-export-dynamic -no-undefined" | 1037 | GN_LIB_LDFLAGS="-export-dynamic -no-undefined" |
1588 | GN_PLUGIN_LDFLAGS="-export-dynamic -avoid-version -module -no-undefined" | 1038 | GN_PLUGIN_LDFLAGS="-export-dynamic -avoid-version -module -no-undefined" |
1589 | 1039 | ||
1590 | AC_SUBST(GN_LIB_LDFLAGS) | 1040 | AC_SUBST([GN_LIB_LDFLAGS]) |
1591 | AC_SUBST(GN_PLUGIN_LDFLAGS) | 1041 | AC_SUBST([GN_PLUGIN_LDFLAGS]) |
1592 | AC_SUBST(GN_INTLINCL) | 1042 | AC_SUBST([GN_INTLINCL]) |
1593 | AC_SUBST(GN_LIBINTL) | 1043 | AC_SUBST([GN_LIBINTL]) |
1594 | 1044 | ||
1595 | AC_SUBST(CPPFLAGS) | 1045 | AC_SUBST([CPPFLAGS]) |
1596 | AC_SUBST(LIBS) | 1046 | AC_SUBST([LIBS]) |
1597 | AC_SUBST(LDFLAGS) | 1047 | AC_SUBST([LDFLAGS]) |
1598 | AC_SUBST(EXT_LIB_PATH) | 1048 | AC_SUBST([EXT_LIB_PATH]) |
1599 | AC_SUBST(EXT_LIBS) | 1049 | AC_SUBST([EXT_LIBS]) |
1600 | 1050 | ||
1601 | AC_SUBST(LIBPREFIX) | 1051 | AC_SUBST([LIBPREFIX]) |
1602 | AC_SUBST(DLLDIR) | 1052 | AC_SUBST([DLLDIR]) |
1603 | AC_SUBST(EXT_LIB_PATH) | 1053 | AC_SUBST([EXT_LIB_PATH]) |
1604 | 1054 | ||
1605 | DATAROOTDIR=$datarootdir | 1055 | DATAROOTDIR=$datarootdir |
1606 | AC_SUBST(DATAROOTDIR) | 1056 | AC_SUBST([DATAROOTDIR]) |
1607 | |||
1608 | # test for sudo | ||
1609 | AC_MSG_CHECKING(for sudo) | ||
1610 | #AC_CHECK_PROGS(SUDO_BINARY, [sudo], false) | ||
1611 | #AM_CONDITIONAL(HAVE_SUDO, test x$SUDO_BINARY != xfalse) | ||
1612 | AC_ARG_WITH(sudo, | ||
1613 | [ --with-sudo=PATH path to sudo binary (or just yes)], | ||
1614 | [AC_MSG_RESULT("$with_sudo") | ||
1615 | AS_CASE([$with_sudo], | ||
1616 | [no],[SUDO_BINARY=], | ||
1617 | [yes],[SUDO_BINARY=sudo], | ||
1618 | [SUDO_BINARY=$with_sudo])], | ||
1619 | [AC_MSG_RESULT([no])]) | ||
1620 | AC_SUBST(SUDO_BINARY) | ||
1621 | AM_CONDITIONAL([HAVE_SUDO], | ||
1622 | [test "x$SUDO_BINARY" != "x" -o -w /]) | ||
1623 | |||
1624 | # test for doas | ||
1625 | AC_MSG_CHECKING(for doas) | ||
1626 | AC_CHECK_PROGS(DOAS_BINARY, [doas], false) | ||
1627 | AM_CONDITIONAL(HAVE_DOAS_BINARY, test x$DOAS_BINARY != xfalse) | ||
1628 | |||
1629 | # test for gnunetdns group name | ||
1630 | GNUNETDNS_GROUP=gnunetdns | ||
1631 | AC_MSG_CHECKING(for gnunetdns group name) | ||
1632 | AC_ARG_WITH(gnunetdns, | ||
1633 | [ --with-gnunetdns=GRPNAME name for gnunetdns group], | ||
1634 | [AC_MSG_RESULT("$with_gnunetdns") | ||
1635 | AS_CASE([$with_gnunetdns], | ||
1636 | [no],[GNUNETDNS_GROUP=gnunet], | ||
1637 | [yes],[GNUNETDNS_GROUP=gnunetdns], | ||
1638 | [GNUNETDNS_GROUP=$with_gnunetdns])], | ||
1639 | [AC_MSG_RESULT([gnunetdns])]) | ||
1640 | AC_SUBST(GNUNETDNS_GROUP) | ||
1641 | 1057 | ||
1058 | # check for sudo | ||
1059 | AC_CHECK_PROGS([SUDO_BINARY], [sudo], [false]) | ||
1060 | AM_CONDITIONAL([HAVE_SUDO], [test "x$SUDO_BINARY" != "xfalse"]) | ||
1642 | 1061 | ||
1062 | # check for doas | ||
1063 | AC_CHECK_PROGS([DOAS_BINARY], [doas], [false]) | ||
1064 | AM_CONDITIONAL([HAVE_DOAS_BINARY], [test "x$DOAS_BINARY" != "xfalse"]) | ||
1643 | 1065 | ||
1644 | # gnutls | 1066 | # check if NSE has to send timestamp information to testbed logger for |
1645 | gnutls=0 | ||
1646 | gnutls_dane=0 | ||
1647 | AC_MSG_CHECKING(for gnutls) | ||
1648 | AC_ARG_WITH(gnutls, | ||
1649 | [ --with-gnutls=PFX base of gnutls installation], | ||
1650 | [AC_MSG_RESULT([$with_gnutls]) | ||
1651 | AS_CASE([$with_gnutls], | ||
1652 | [no],[], | ||
1653 | [yes], | ||
1654 | [AC_CHECK_HEADERS([gnutls/abstract.h], | ||
1655 | AC_CHECK_LIB([gnutls], | ||
1656 | [gnutls_priority_set], | ||
1657 | gnutls=true)) | ||
1658 | AC_CHECK_HEADERS([gnutls/dane.h], | ||
1659 | AC_CHECK_LIB([gnutls-dane], | ||
1660 | [dane_verify_crt_raw], | ||
1661 | gnutls_dane=1))], | ||
1662 | |||
1663 | [LDFLAGS="-L$with_gnutls/lib $LDFLAGS" | ||
1664 | CPPFLAGS="-I$with_gnutls/include $CPPFLAGS" | ||
1665 | AC_CHECK_HEADERS([gnutls/abstract.h], | ||
1666 | AC_CHECK_LIB([gnutls], [gnutls_priority_set], | ||
1667 | EXT_LIB_PATH="-L$with_gnutls/lib $EXT_LIB_PATH" | ||
1668 | gnutls=true)) | ||
1669 | AC_CHECK_HEADERS([gnutls/dane.h], | ||
1670 | AC_CHECK_LIB([gnutls-dane], [dane_verify_crt_raw], | ||
1671 | gnutls_dane=1)) | ||
1672 | ]) | ||
1673 | ], | ||
1674 | [AC_MSG_RESULT([--with-gnutls not specified]) | ||
1675 | AC_CHECK_HEADERS([gnutls/abstract.h], | ||
1676 | AC_CHECK_LIB([gnutls], [gnutls_priority_set], | ||
1677 | gnutls=true)) | ||
1678 | AC_CHECK_HEADERS([gnutls/dane.h], | ||
1679 | AC_CHECK_LIB([gnutls-dane], [dane_verify_crt_raw], | ||
1680 | gnutls_dane=1)) | ||
1681 | ]) | ||
1682 | AM_CONDITIONAL(HAVE_GNUTLS, test x$gnutls = xtrue) | ||
1683 | AC_DEFINE_UNQUOTED([HAVE_GNUTLS], $gnutls, [We have GnuTLS]) | ||
1684 | AM_CONDITIONAL(HAVE_GNUTLS_DANE, test x$gnutls_dane = x1) | ||
1685 | AC_DEFINE_UNQUOTED([HAVE_GNUTLS_DANE], $gnutls_dane, [We have GnuTLS with DANE support]) | ||
1686 | |||
1687 | |||
1688 | |||
1689 | # Test if we are building for superMUC | ||
1690 | AC_MSG_CHECKING(if GNUnet is being configured to run on the SuperMUC) | ||
1691 | AC_ARG_ENABLE([supermuc], | ||
1692 | [AS_HELP_STRING([--enable-supermuc], | ||
1693 | [build GNUnet with support to run on the SuperMUC (default is NO)])], | ||
1694 | [AS_IF([test "x$enable_supermuc" = "xno"], | ||
1695 | [supermuc=0], | ||
1696 | [supermuc=1])], | ||
1697 | [supermuc=0 | ||
1698 | enable_supermuc=no]) | ||
1699 | AC_MSG_RESULT($enable_SUPERMUC) | ||
1700 | AM_CONDITIONAL([ENABLE_SUPERMUC], [test "x$supermuc" = "x1"]) | ||
1701 | AC_DEFINE_UNQUOTED([ENABLE_SUPERMUC], [$supermuc], [Build with support for SuperMUC]) | ||
1702 | |||
1703 | # Check if NSE has to send timestamp information to testbed logger for | ||
1704 | # generating histogram of messages received | 1067 | # generating histogram of messages received |
1705 | AC_MSG_CHECKING(if NSE has to send timestamp information to testbed logger) | ||
1706 | AC_ARG_ENABLE([nse-histogram], | 1068 | AC_ARG_ENABLE([nse-histogram], |
1707 | [AS_HELP_STRING([--enable-nse-histogram], | 1069 | [AS_HELP_STRING([--enable-nse-histogram], |
1708 | [have NSE send timestamp information to testbed logger for generating | 1070 | [have NSE send timestamp information to testbed logger for generating a histogram of received messages. NOT useful for production (default is no)])], |
1709 | histogram of received messages. NOT useful for production (default is | 1071 | [AS_IF([test "x$enableval" = "xno"] |
1710 | NO)])], | 1072 | [nse_histogram=0], |
1711 | [AS_IF([test "x$enableval" = "xno"], | 1073 | [nse_histogram=1])], |
1712 | [nse_histogram=0], | 1074 | [nse_histogram=0]) |
1713 | [nse_histogram=1])], | ||
1714 | [nse_histogram=0 | ||
1715 | enable_nse_histogram=no]) | ||
1716 | AC_MSG_RESULT($enable_nse_histogram) | ||
1717 | AM_CONDITIONAL([ENABLE_NSE_HISTOGRAM], [test "x$nse_histogram" = "x1"]) | 1075 | AM_CONDITIONAL([ENABLE_NSE_HISTOGRAM], [test "x$nse_histogram" = "x1"]) |
1718 | AC_DEFINE_UNQUOTED([ENABLE_NSE_HISTOGRAM], [$nse_histogram], | 1076 | AC_DEFINE_UNQUOTED([ENABLE_NSE_HISTOGRAM], [$nse_histogram], |
1719 | [have NSE send timestamp information to testbed logger]) | 1077 | [Define to 1 if NSE should send timestamp information]) |
1720 | 1078 | ||
1721 | # should 'make check' run tests? | 1079 | # check if 'make check' should run tests |
1722 | AC_MSG_CHECKING(whether to run tests) | ||
1723 | AC_ARG_ENABLE([testruns], | 1080 | AC_ARG_ENABLE([testruns], |
1724 | [AS_HELP_STRING([--disable-testruns], [disable running tests on make check (default is YES)])], | 1081 | [AS_HELP_STRING([--disable-testruns], |
1725 | [enable_tests_run=${enableval}], | 1082 | [disable running tests on make check])], |
1726 | [enable_tests_run=yes]) | 1083 | [enable_testruns=${enableval}], |
1727 | AC_MSG_RESULT($enable_test_run) | 1084 | [enable_testruns=yes]) |
1728 | AM_CONDITIONAL([ENABLE_TEST_RUN], [test "x$enable_tests_run" = "xyes"]) | 1085 | AM_CONDITIONAL([ENABLE_TEST_RUN], [test "x$enable_testruns" = "xyes"]) |
1729 | |||
1730 | |||
1731 | AC_MSG_CHECKING([whether to compile in benchmarks (currently for http and crypto)]) | ||
1732 | AC_ARG_ENABLE([benchmark], | ||
1733 | [AS_HELP_STRING([--enable-benchmark], [enable benchmarking])], | ||
1734 | [enable_benchmark=${enableval}], | ||
1735 | [enable_benchmark=no]) | ||
1736 | AC_MSG_RESULT($enable_benchmark) | ||
1737 | AS_IF([test "x$enable_benchmark" = "xyes"], | ||
1738 | [AC_DEFINE_UNQUOTED(ENABLE_BENCHMARK,1,[Benchmarks are enabled])]) | ||
1739 | AM_CONDITIONAL([ENABLE_BENCHMARK], [test "x$enable_benchmark" = "xyes"]) | ||
1740 | |||
1741 | |||
1742 | # should expensive tests be run? | ||
1743 | AC_MSG_CHECKING(whether to run expensive tests) | ||
1744 | AC_ARG_ENABLE([expensivetests], | ||
1745 | [AS_HELP_STRING([--enable-expensivetests], [enable running expensive testcases])], | ||
1746 | [enable_expensive=${enableval}], | ||
1747 | [enable_expensive=no]) | ||
1748 | AC_MSG_RESULT($enable_expensive) | ||
1749 | AM_CONDITIONAL([HAVE_EXPENSIVE_TESTS], [test "x$enable_expensive" = "xyes"]) | ||
1750 | |||
1751 | # should ports be open for Java services? | ||
1752 | AC_MSG_CHECKING(whether to enable ports for gnunet-java) | ||
1753 | AC_ARG_ENABLE([javaports], | ||
1754 | [AS_HELP_STRING([--enable-javaports], [use non-zero ports for services with Java bindings (default is NO)])], | ||
1755 | [enable_java_ports=${enableval}], | ||
1756 | [enable_java_ports=no]) | ||
1757 | AC_MSG_RESULT($enable_java_ports) | ||
1758 | AS_IF([test "x$enable_java_ports" = "xyes"], | ||
1759 | [JAVAPORT=""], | ||
1760 | [JAVAPORT="$UNIXONLY"]) | ||
1761 | AC_SUBST(JAVAPORT) | ||
1762 | 1086 | ||
1763 | # should benchmarks be run? | 1087 | # check if benchmarks should be executed |
1764 | AC_MSG_CHECKING(whether to run benchmarks during make check) | ||
1765 | AC_ARG_ENABLE([benchmarks], | 1088 | AC_ARG_ENABLE([benchmarks], |
1766 | [AS_HELP_STRING([--enable-benchmarks], [enable running benchmarks during make check])], | 1089 | [AS_HELP_STRING([--enable-benchmarks], |
1767 | [enable_benchmarks=${enableval}], | 1090 | [enable benchmarking (default is no)])], |
1768 | [enable_benchmarks=no]) | 1091 | [enable_benchmarks=${enableval}], |
1769 | AC_MSG_RESULT($enable_benchmarks) | 1092 | [enable_benchmarks=no]) |
1093 | |||
1094 | AS_IF([test "x$enable_benchmarks" = "xyes"], | ||
1095 | [AC_DEFINE([ENABLE_BENCHMARK], [1], [Define to 1 if benchmarks are enabled])]) | ||
1096 | AM_CONDITIONAL([ENABLE_BENCHMARK], [test "x$enable_benchmarks" = "xyes"]) | ||
1770 | AM_CONDITIONAL([HAVE_BENCHMARKS], [test "x$enable_benchmarks" = "xyes"]) | 1097 | AM_CONDITIONAL([HAVE_BENCHMARKS], [test "x$enable_benchmarks" = "xyes"]) |
1771 | 1098 | ||
1772 | # should gnunet-testing be compiled | 1099 | # check if ports should be opened for Java services |
1773 | AC_MSG_CHECKING(whether to compile gnunet-testing) | 1100 | AC_ARG_ENABLE([javaports], |
1774 | AC_ARG_ENABLE([testing], | 1101 | [AS_HELP_STRING([--enable-javaports], |
1775 | [AS_HELP_STRING([--disable-testing], [do not build gnunet-testing])], | 1102 | [use non-zero ports for services with Java bindings (default is no)])], |
1776 | [enable_testing=${enableval}], | 1103 | [enable_java_ports=${enableval}], |
1777 | [enable_testing=yes]) | 1104 | [enable_java_ports="no"]) |
1778 | AC_MSG_RESULT($enable_testing) | 1105 | |
1779 | AM_CONDITIONAL([HAVE_TESTING], [test "x$enable_testing" = "xyes"]) | 1106 | AS_IF([test "x$enable_java_ports" = "xyes"], |
1780 | 1107 | [JAVAPORT=""], | |
1781 | # should experimental code be compiled (code that may not yet compile)? | 1108 | [JAVAPORT="$UNIXONLY"]) |
1782 | AC_MSG_CHECKING(whether to compile experimental code) | 1109 | AC_SUBST([JAVAPORT]) |
1110 | |||
1111 | # check if experimental code should be compiled (or at least attempted to) | ||
1783 | AC_ARG_ENABLE([experimental], | 1112 | AC_ARG_ENABLE([experimental], |
1784 | [AS_HELP_STRING([--enable-experimental], [enable compiling experimental code])], | 1113 | [AS_HELP_STRING([--enable-experimental], |
1785 | [enable_experimental=${enableval}], | 1114 | [enable experimental code paths (default is no)])], |
1786 | [enable_experimental=no]) | 1115 | [AS_IF([test "x$enableval" = "xno"], |
1787 | AC_MSG_RESULT($enable_experimental) | 1116 | [enable_experimental=0], |
1788 | AM_CONDITIONAL([HAVE_EXPERIMENTAL], [test "x$enable_experimental" = "xyes"]) | 1117 | [enable_experimental=1])], |
1789 | 1118 | [enable_experimental=0]) | |
1790 | # should malicious code be compiled (should only be used for testing)? | 1119 | AM_CONDITIONAL([HAVE_EXPERIMENTAL], [test "x$enable_experimental" = "x1"]) |
1791 | AC_MSG_CHECKING(whether to compile malicious code) | 1120 | AS_IF([test "x$enable_experimental" = "x1"], |
1121 | AC_DEFINE([GNUNET_EXPERIMENTAL], 1, [Set to 1 is this is an experimental build])) | ||
1122 | |||
1123 | AC_SUBST([enable_experimental]) | ||
1124 | |||
1125 | # check if malicious code should be compiled (for testing) | ||
1792 | AC_ARG_ENABLE([malicious], | 1126 | AC_ARG_ENABLE([malicious], |
1793 | [AS_HELP_STRING([--enable-malicious], [enable compiling malicious code])], | 1127 | [AS_HELP_STRING([--enable-malicious], |
1794 | [AS_IF([test "x$enableval" = "xno"], | 1128 | [enable malicious code path (only for testing; default is no)])], |
1795 | [malicious=0], | 1129 | [AS_IF([test "x$enableval" = "xno"], |
1796 | [malicious=1])], | 1130 | [malicious=0], |
1797 | [malicious=0 | 1131 | [malicious=1])], |
1798 | enable_malicious=no]) | 1132 | [malicious=0 |
1799 | AC_MSG_RESULT($enable_malicious) | 1133 | enable_malicious=no]) |
1800 | AM_CONDITIONAL([ENABLE_MALICIOUS], [test 1=$malicious]) | 1134 | AM_CONDITIONAL([ENABLE_MALICIOUS], [test "x$malicious" = "x1"]) |
1801 | AC_DEFINE_UNQUOTED([ENABLE_MALICIOUS], [$malicious], | 1135 | AC_DEFINE_UNQUOTED([ENABLE_MALICIOUS], [$malicious], |
1802 | [enable compilation of malicious code]) | 1136 | [Define to 1 if malicious code paths should be compiled]) |
1803 | 1137 | ||
1804 | # should services be started on demand when needed? | 1138 | # check if services should be started on demand when needed |
1805 | # Some services may choose to never start by default | 1139 | # Some services may choose to never start by default |
1806 | # and it is up to the service/module developer to decide | 1140 | # and it is up to the service/module developer to decide |
1807 | # by having "START_ON_DEMAND = NO" instead of | 1141 | # by having "START_ON_DEMAND = NO" instead of |
1808 | # "START_ON_DEMAND = @START_ON_DEMAND@" | 1142 | # "START_ON_DEMAND = @START_ON_DEMAND@" |
1809 | # in the service/module's conf.in file. | 1143 | # in the service/module's conf.in file. |
1810 | # See also IMMEDIATE_START for an unconditional immediate start. | 1144 | # See also IMMEDIATE_START for an unconditional immediate start. |
1811 | START_ON_DEMAND="YES" | ||
1812 | AC_MSG_CHECKING(whether to start peer's services on demand by default) | ||
1813 | AC_ARG_ENABLE([autostart], | 1145 | AC_ARG_ENABLE([autostart], |
1814 | [AS_HELP_STRING([--disable-autostart], [do not start peer's services by default])], | 1146 | [AS_HELP_STRING([--disable-autostart], |
1815 | [enable_autostart=${enableval} | 1147 | [do not start peer services by default])], |
1816 | AS_IF([test "x$enable_autostart" = "xno"], | 1148 | [AS_IF([test "x$enableval" = "xno"], |
1817 | [START_ON_DEMAND="NO"]) | 1149 | [START_ON_DEMAND=NO], |
1818 | ], | 1150 | [START_ON_DEMAND=YES])], |
1819 | [enable_autostart=yes]) | 1151 | [START_ON_DEMAND=YES]) |
1820 | AC_MSG_RESULT($enable_autostart) | 1152 | AC_SUBST([START_ON_DEMAND]) |
1821 | #AM_CONDITIONAL([HAVE_START_ON_DEMAND], [test "x$enable_autostart" = "xyes"]) | 1153 | |
1822 | AC_SUBST(START_ON_DEMAND) | 1154 | # check if memory statistics should be kept (very expensive CPU-wise!) |
1823 | |||
1824 | # should memory statistics be kept (very expensive CPU-wise!) | ||
1825 | AC_MSG_CHECKING(whether to create expensive statistics on memory use) | ||
1826 | AC_ARG_ENABLE([heapstats], | 1155 | AC_ARG_ENABLE([heapstats], |
1827 | [AS_HELP_STRING([--enable-heapstats], [enable expensive heap statistics])], | 1156 | [AS_HELP_STRING([--enable-heapstats], [enable expensive heap statistics])], |
1828 | [enable_heapstats=1], | 1157 | [AS_IF([test "x$enableval" = "xno"], |
1829 | [enable_heapstats=0]) | 1158 | [enable_heapstats=0], |
1830 | AC_MSG_RESULT($enable_heapstats) | 1159 | [enable_heapstats=1])], |
1831 | AC_DEFINE_UNQUOTED([ENABLE_HEAP_STATISTICS],$enable_heapstats,[enable expensive heap statistics]) | 1160 | [enable_heapstats=0]) |
1832 | 1161 | AC_DEFINE_UNQUOTED([ENABLE_HEAP_STATISTICS], [$enable_heapstats], | |
1833 | 1162 | [Define to 1 if expensive heap statistics should be enabled]) | |
1834 | # Check if the __thread storage class for | 1163 | |
1835 | # thread-local storage is available. | 1164 | # check if the __thread storage class is available |
1836 | AC_MSG_CHECKING(whether __thread is supported) | 1165 | AC_MSG_CHECKING([if __thread is supported]) |
1837 | AC_LINK_IFELSE( | 1166 | AC_LINK_IFELSE( |
1838 | [AC_LANG_PROGRAM([#include <stdlib.h> | 1167 | [AC_LANG_PROGRAM([#include <stdlib.h> |
1839 | #undef __thread | 1168 | #undef __thread |
1840 | static __thread int a = 1;], | 1169 | static __thread int a = 1;], |
1841 | [exit(a-1);])], | 1170 | [exit(a-1);])], |
1842 | [have_thread_local_gcc=1],[have_thread_local_gcc=0]) | 1171 | [have_thread_local=1], |
1843 | AC_DEFINE_UNQUOTED([HAVE_THREAD_LOCAL_GCC],$have_thread_local_gcc,[Define this if __thread is supported]) | 1172 | [have_thread_local=0]) |
1844 | AS_IF([test "x$have_thread_local_gcc" = "x1"], | 1173 | AC_DEFINE_UNQUOTED([HAVE_THREAD_LOCAL_GCC], [$have_thread_local], |
1845 | [AC_MSG_RESULT(yes)], | 1174 | [Define to 1 if __thread is supported]) |
1846 | [AC_MSG_RESULT(no)]) | 1175 | AS_IF([test "x$have_thread_local" = "x1"], |
1847 | 1176 | [AC_MSG_RESULT([yes])], | |
1848 | # gcov compilation | 1177 | [AC_MSG_RESULT([no])]) |
1849 | AC_MSG_CHECKING(whether to compile with support for code coverage analysis) | 1178 | |
1179 | # check if gcov should be used | ||
1850 | AC_ARG_ENABLE([coverage], | 1180 | AC_ARG_ENABLE([coverage], |
1851 | AS_HELP_STRING([--enable-coverage], | 1181 | [AS_HELP_STRING([--enable-coverage], |
1852 | [compile the library with code coverage support]), | 1182 | [compile the library with code coverage support])], |
1853 | [use_gcov=${enableval}], | 1183 | [use_gcov=${enableval}], |
1854 | [use_gcov=no]) | 1184 | [use_gcov=no]) |
1855 | AC_MSG_RESULT($use_gcov) | ||
1856 | AM_CONDITIONAL([USE_COVERAGE], [test "x$use_gcov" = "xyes"]) | 1185 | AM_CONDITIONAL([USE_COVERAGE], [test "x$use_gcov" = "xyes"]) |
1857 | 1186 | ||
1858 | |||
1859 | # Temporarily disable a specific piece of code until TNG is out. | 1187 | # Temporarily disable a specific piece of code until TNG is out. |
1860 | AC_ARG_ENABLE([transport-timing-diagnostic], | 1188 | AC_ARG_ENABLE([transport-timing-diagnostic], |
1861 | [AS_HELP_STRING([--enable-transport-timing-diagnostic], | 1189 | [AS_HELP_STRING([--enable-transport-timing-diagnostic], |
1862 | [enable logging of transport (not TNG) sending times])], | 1190 | [enable logging of transport (not TNG) sending times])], |
1863 | [enable_ttd=yes], | 1191 | [enable_ttd=yes], |
1864 | [enable_ttd=no]) | 1192 | [enable_ttd=no]) |
1865 | AS_IF([test "x$enable_ttd" = "xyes"], | 1193 | AS_IF([test "x$enable_ttd" = "xyes"], |
1866 | [AC_DEFINE([ENABLE_TTD], [1], [Define if transport (not TNG) should warn about sending times.])]) | 1194 | [AC_DEFINE([ENABLE_TTD], [1], |
1867 | 1195 | [Define if transport (not TNG) should warn about sending times.])]) | |
1868 | 1196 | ||
1869 | # version info | 1197 | # get version information |
1870 | # TODO: git blame says this predates our switch to git. | 1198 | AC_PATH_PROG([gitcommand], [git]) |
1871 | # git-svn should be adjusted to simply git, or | 1199 | AC_MSG_CHECKING([if source is under a VCS]) |
1872 | # an external script that does the job. | 1200 | AS_IF([test "x$gitcommand" = "x"], |
1873 | AC_PATH_PROG(svnversioncommand, svnversion) | 1201 | [vcs_name="no" |
1874 | AC_PATH_PROG(gitcommand, git) | 1202 | vcs_version="\"release\""], |
1875 | AC_MSG_CHECKING(for source being under a VCS) | 1203 | [AS_IF([test -d .git], dnl admittedly, not the best |
1876 | 1204 | [git_version=$(cd $srcdir; git log -n1 --abbrev-commit | head -n1 | cut -d ' ' -f2 2>/dev/null) | |
1877 | 1205 | vcs_name='yes, git-svn' | |
1878 | # version info | 1206 | vcs_version="\"git-$git_version\""], |
1879 | AC_PATH_PROG(gitcommand, git) | 1207 | [vcs_name="no" |
1880 | AC_MSG_CHECKING(for source being under a VCS) | 1208 | vcs_version="\"release\""])]) |
1881 | git_version= | 1209 | AC_MSG_RESULT([$vcs_name]) |
1882 | AS_IF([test ! "X$gitcommand" = "X"], | 1210 | AC_DEFINE_UNQUOTED([VCS_VERSION], [$vcs_version], |
1883 | [ | 1211 | [VCS revision/hash or tarball version]) |
1884 | git_version=$(cd $srcdir ; git log -n1 --abbrev-commit | head -n1 | cut -d " " -f2 2>/dev/null) | ||
1885 | ]) | ||
1886 | AS_IF([test "X$git_version" = "X"], | ||
1887 | [ | ||
1888 | vcs_name="no" | ||
1889 | vcs_version="\"release\"" | ||
1890 | ], | ||
1891 | [ | ||
1892 | vcs_name="yes, git-svn" | ||
1893 | vcs_version="\"git-$git_version\"" | ||
1894 | ]) | ||
1895 | AC_MSG_RESULT($vcs_name) | ||
1896 | |||
1897 | AC_MSG_CHECKING(VCS version) | ||
1898 | AC_MSG_RESULT($vcs_version) | ||
1899 | AC_DEFINE_UNQUOTED(VCS_VERSION, [$vcs_version], [VCS revision/hash or tarball version]) | ||
1900 | 1212 | ||
1901 | AC_CONFIG_FILES([ | 1213 | AC_CONFIG_FILES([ |
1902 | Makefile | 1214 | Makefile |
1903 | bin/Makefile | ||
1904 | contrib/Makefile | 1215 | contrib/Makefile |
1905 | contrib/hellos/Makefile | 1216 | data/Makefile |
1217 | data/hellos/Makefile | ||
1218 | scripts/Makefile | ||
1906 | contrib/services/Makefile | 1219 | contrib/services/Makefile |
1907 | contrib/services/openrc/Makefile | 1220 | contrib/services/openrc/Makefile |
1908 | contrib/services/systemd/Makefile | 1221 | contrib/services/systemd/Makefile |
@@ -1911,112 +1224,141 @@ contrib/scripts/gnunet-logread/Makefile | |||
1911 | doc/Makefile | 1224 | doc/Makefile |
1912 | doc/man/Makefile | 1225 | doc/man/Makefile |
1913 | doc/doxygen/Makefile | 1226 | doc/doxygen/Makefile |
1914 | doc/handbook/Makefile | ||
1915 | doc/tutorial/Makefile | ||
1916 | m4/Makefile | 1227 | m4/Makefile |
1917 | po/Makefile.in | 1228 | po/Makefile.in |
1918 | src/Makefile | 1229 | src/Makefile |
1919 | src/arm/Makefile | 1230 | src/lib/Makefile |
1920 | src/arm/arm.conf | 1231 | src/lib/util/Makefile |
1921 | src/ats/Makefile | 1232 | src/lib/block/Makefile |
1922 | src/ats/ats.conf | 1233 | src/lib/curl/Makefile |
1923 | src/ats-tool/Makefile | 1234 | src/lib/gnsrecord/Makefile |
1924 | src/auction/Makefile | 1235 | src/lib/json/Makefile |
1925 | src/block/Makefile | 1236 | src/lib/pq/Makefile |
1926 | src/cadet/Makefile | 1237 | src/lib/sq/Makefile |
1927 | src/cadet/cadet.conf | 1238 | src/plugin/Makefile |
1928 | src/core/Makefile | 1239 | src/plugin/block/Makefile |
1929 | src/core/core.conf | 1240 | src/plugin/datacache/Makefile |
1930 | src/consensus/Makefile | 1241 | src/plugin/datastore/Makefile |
1931 | src/consensus/consensus.conf | 1242 | src/plugin/dht/Makefile |
1932 | src/conversation/Makefile | 1243 | src/plugin/dns/Makefile |
1933 | src/conversation/conversation.conf | 1244 | src/plugin/fs/Makefile |
1934 | src/curl/Makefile | 1245 | src/plugin/gns/Makefile |
1935 | src/datacache/Makefile | 1246 | src/plugin/gnsrecord/Makefile |
1936 | src/datastore/Makefile | 1247 | src/plugin/namecache/Makefile |
1937 | src/datastore/datastore.conf | 1248 | src/plugin/namestore/Makefile |
1938 | src/dht/Makefile | 1249 | src/plugin/peerstore/Makefile |
1939 | src/dht/dht.conf | 1250 | src/plugin/reclaim/Makefile |
1940 | src/dhtu/Makefile | 1251 | src/plugin/regex/Makefile |
1941 | src/dns/Makefile | 1252 | src/plugin/revocation/Makefile |
1942 | src/dns/dns.conf | 1253 | src/plugin/seti/Makefile |
1943 | src/exit/Makefile | 1254 | src/plugin/setu/Makefile |
1944 | src/fragmentation/Makefile | 1255 | src/plugin/messenger/Makefile |
1945 | src/fs/Makefile | 1256 | src/service/Makefile |
1946 | src/fs/fs.conf | 1257 | src/service/arm/Makefile |
1947 | src/gns/Makefile | 1258 | src/service/arm/arm.conf |
1948 | src/gns/gns.conf | 1259 | src/service/cadet/Makefile |
1949 | src/gns/nss/Makefile | 1260 | src/service/cadet/cadet.conf |
1950 | src/gnsrecord/Makefile | 1261 | src/service/core/Makefile |
1951 | src/hello/Makefile | 1262 | src/service/core/core.conf |
1952 | src/identity/Makefile | 1263 | src/service/datacache/Makefile |
1953 | src/identity/identity.conf | 1264 | src/service/datastore/Makefile |
1265 | src/service/datastore/datastore.conf | ||
1266 | src/service/dht/Makefile | ||
1267 | src/service/dht/dht.conf | ||
1268 | src/service/dns/Makefile | ||
1269 | src/service/dns/dns.conf | ||
1270 | src/service/exit/Makefile | ||
1271 | src/service/fs/Makefile | ||
1272 | src/service/fs/fs.conf | ||
1273 | src/service/gns/Makefile | ||
1274 | src/service/gns/gns.conf | ||
1275 | src/service/gns/nss/Makefile | ||
1276 | src/service/hostlist/Makefile | ||
1277 | src/service/identity/Makefile | ||
1278 | src/service/identity/identity.conf | ||
1279 | src/service/messenger/Makefile | ||
1280 | src/service/messenger/messenger.conf | ||
1281 | src/service/namecache/Makefile | ||
1282 | src/service/namecache/namecache.conf | ||
1283 | src/service/namestore/Makefile | ||
1284 | src/service/namestore/namestore.conf | ||
1285 | src/service/nat/Makefile | ||
1286 | src/service/nat/nat.conf | ||
1287 | src/service/nat-auto/Makefile | ||
1288 | src/service/nat-auto/nat-auto.conf | ||
1289 | src/service/nse/Makefile | ||
1290 | src/service/nse/nse.conf | ||
1291 | src/service/peerstore/Makefile | ||
1292 | src/service/peerstore/peerstore.conf | ||
1293 | src/service/pt/Makefile | ||
1294 | src/service/reclaim/Makefile | ||
1295 | src/service/regex/Makefile | ||
1296 | src/service/regex/regex.conf | ||
1297 | src/service/rest/Makefile | ||
1298 | src/service/revocation/Makefile | ||
1299 | src/service/revocation/revocation.conf | ||
1300 | src/service/seti/Makefile | ||
1301 | src/service/seti/seti.conf | ||
1302 | src/service/setu/Makefile | ||
1303 | src/service/setu/setu.conf | ||
1304 | src/service/statistics/Makefile | ||
1305 | src/service/statistics/statistics.conf | ||
1306 | src/service/testing/Makefile | ||
1307 | src/service/topology/Makefile | ||
1308 | src/service/transport/Makefile | ||
1309 | src/service/transport/transport.conf | ||
1310 | src/service/util/Makefile | ||
1311 | src/service/util/resolver.conf | ||
1312 | src/service/vpn/Makefile | ||
1313 | src/service/vpn/vpn.conf | ||
1314 | src/service/zonemaster/Makefile | ||
1315 | src/service/zonemaster/zonemaster.conf | ||
1316 | src/cli/Makefile | ||
1317 | src/cli/arm/Makefile | ||
1318 | src/cli/cadet/Makefile | ||
1319 | src/cli/core/Makefile | ||
1320 | src/cli/datastore/Makefile | ||
1321 | src/cli/dht/Makefile | ||
1322 | src/cli/fs/Makefile | ||
1323 | src/cli/gns/Makefile | ||
1324 | src/cli/identity/Makefile | ||
1325 | src/cli/messenger/Makefile | ||
1326 | src/cli/namecache/Makefile | ||
1327 | src/cli/namestore/Makefile | ||
1328 | src/cli/peerstore/Makefile | ||
1329 | src/cli/nat/Makefile | ||
1330 | src/cli/nat-auto/Makefile | ||
1331 | src/cli/nse/Makefile | ||
1332 | src/cli/reclaim/Makefile | ||
1333 | src/cli/revocation/Makefile | ||
1334 | src/cli/statistics/Makefile | ||
1335 | src/cli/util/Makefile | ||
1336 | src/cli/vpn/Makefile | ||
1337 | src/contrib/Makefile | ||
1338 | src/contrib/service/Makefile | ||
1339 | src/contrib/service/abd/Makefile | ||
1340 | src/contrib/service/abd/abd.conf | ||
1341 | src/contrib/service/auction/Makefile | ||
1342 | src/contrib/service/consensus/Makefile | ||
1343 | src/contrib/service/consensus/consensus.conf | ||
1344 | src/contrib/service/conversation/Makefile | ||
1345 | src/contrib/service/conversation/conversation.conf | ||
1346 | src/contrib/service/scalarproduct/Makefile | ||
1347 | src/contrib/service/scalarproduct/scalarproduct.conf | ||
1348 | src/contrib/service/secretsharing/Makefile | ||
1349 | src/contrib/service/secretsharing/secretsharing.conf | ||
1350 | src/contrib/service/set/Makefile | ||
1351 | src/contrib/service/set/set.conf | ||
1352 | src/contrib/service/rps/Makefile | ||
1353 | src/contrib/service/rps/rps.conf | ||
1354 | src/contrib/service/template/Makefile | ||
1355 | src/contrib/cli/Makefile | ||
1356 | src/contrib/cli/template/Makefile | ||
1357 | src/lib/hello/Makefile | ||
1954 | src/include/Makefile | 1358 | src/include/Makefile |
1955 | src/integration-tests/Makefile | 1359 | src/include/gnunet_config.h |
1956 | src/json/Makefile | ||
1957 | src/hostlist/Makefile | ||
1958 | src/my/Makefile | ||
1959 | src/mysql/Makefile | ||
1960 | src/namecache/Makefile | ||
1961 | src/namecache/namecache.conf | ||
1962 | src/namestore/Makefile | ||
1963 | src/namestore/namestore.conf | ||
1964 | src/nat/Makefile | ||
1965 | src/nat/nat.conf | ||
1966 | src/nat-auto/Makefile | ||
1967 | src/nat-auto/nat-auto.conf | ||
1968 | src/nse/Makefile | ||
1969 | src/nse/nse.conf | ||
1970 | src/nt/Makefile | ||
1971 | src/peerinfo/Makefile | ||
1972 | src/peerinfo/peerinfo.conf | ||
1973 | src/peerinfo-tool/Makefile | ||
1974 | src/peerstore/Makefile | ||
1975 | src/peerstore/peerstore.conf | ||
1976 | src/pq/Makefile | ||
1977 | src/pt/Makefile | ||
1978 | src/regex/Makefile | ||
1979 | src/regex/regex.conf | ||
1980 | src/revocation/Makefile | ||
1981 | src/revocation/revocation.conf | ||
1982 | src/rps/Makefile | ||
1983 | src/rps/rps.conf | ||
1984 | src/secretsharing/Makefile | ||
1985 | src/secretsharing/secretsharing.conf | ||
1986 | src/scalarproduct/Makefile | ||
1987 | src/scalarproduct/scalarproduct.conf | ||
1988 | src/set/Makefile | ||
1989 | src/set/set.conf | ||
1990 | src/seti/Makefile | ||
1991 | src/seti/seti.conf | ||
1992 | src/setu/Makefile | ||
1993 | src/setu/setu.conf | ||
1994 | src/sq/Makefile | ||
1995 | src/statistics/Makefile | ||
1996 | src/statistics/statistics.conf | ||
1997 | src/template/Makefile | ||
1998 | src/testbed/Makefile | ||
1999 | src/testbed/testbed.conf | ||
2000 | src/testbed-logger/Makefile | ||
2001 | src/testbed-logger/testbed-logger.conf | ||
2002 | src/testing/Makefile | ||
2003 | src/topology/Makefile | ||
2004 | src/transport/Makefile | ||
2005 | src/transport/transport.conf | ||
2006 | src/util/Makefile | ||
2007 | src/util/resolver.conf | ||
2008 | src/vpn/Makefile | ||
2009 | src/vpn/vpn.conf | ||
2010 | src/zonemaster/Makefile | ||
2011 | src/zonemaster/zonemaster.conf | ||
2012 | src/rest/Makefile | ||
2013 | src/abe/Makefile | ||
2014 | src/reclaim/Makefile | ||
2015 | src/messenger/Makefile | ||
2016 | src/messenger/messenger.conf | ||
2017 | pkgconfig/Makefile | 1360 | pkgconfig/Makefile |
2018 | pkgconfig/gnunetarm.pc | 1361 | pkgconfig/gnunetarm.pc |
2019 | pkgconfig/gnunetats.pc | ||
2020 | pkgconfig/gnunetblock.pc | 1362 | pkgconfig/gnunetblock.pc |
2021 | pkgconfig/gnunetcadet.pc | 1363 | pkgconfig/gnunetcadet.pc |
2022 | pkgconfig/gnunetconsensus.pc | 1364 | pkgconfig/gnunetconsensus.pc |
@@ -2026,19 +1368,18 @@ pkgconfig/gnunetdatacache.pc | |||
2026 | pkgconfig/gnunetdatastore.pc | 1368 | pkgconfig/gnunetdatastore.pc |
2027 | pkgconfig/gnunetdht.pc | 1369 | pkgconfig/gnunetdht.pc |
2028 | pkgconfig/gnunetdns.pc | 1370 | pkgconfig/gnunetdns.pc |
2029 | pkgconfig/gnunetenv.pc | ||
2030 | pkgconfig/gnunetfragmentation.pc | ||
2031 | pkgconfig/gnunetfs.pc | 1371 | pkgconfig/gnunetfs.pc |
2032 | pkgconfig/gnunetgns.pc | 1372 | pkgconfig/gnunetgns.pc |
2033 | pkgconfig/gnunethello.pc | 1373 | pkgconfig/gnunethello.pc |
2034 | pkgconfig/gnunetidentity.pc | 1374 | pkgconfig/gnunetidentity.pc |
1375 | pkgconfig/gnunetjson.pc | ||
1376 | pkgconfig/gnunetmessenger.pc | ||
2035 | pkgconfig/gnunetmicrophone.pc | 1377 | pkgconfig/gnunetmicrophone.pc |
2036 | pkgconfig/gnunetmysql.pc | ||
2037 | pkgconfig/gnunetnamestore.pc | 1378 | pkgconfig/gnunetnamestore.pc |
2038 | pkgconfig/gnunetnat.pc | 1379 | pkgconfig/gnunetnat.pc |
2039 | pkgconfig/gnunetnse.pc | 1380 | pkgconfig/gnunetnse.pc |
2040 | pkgconfig/gnunetpeerinfo.pc | ||
2041 | pkgconfig/gnunetpq.pc | 1381 | pkgconfig/gnunetpq.pc |
1382 | pkgconfig/gnunetreclaim.pc | ||
2042 | pkgconfig/gnunetregex.pc | 1383 | pkgconfig/gnunetregex.pc |
2043 | pkgconfig/gnunetrevocation.pc | 1384 | pkgconfig/gnunetrevocation.pc |
2044 | pkgconfig/gnunetrps.pc | 1385 | pkgconfig/gnunetrps.pc |
@@ -2046,151 +1387,143 @@ pkgconfig/gnunetscalarproduct.pc | |||
2046 | pkgconfig/gnunetset.pc | 1387 | pkgconfig/gnunetset.pc |
2047 | pkgconfig/gnunetspeaker.pc | 1388 | pkgconfig/gnunetspeaker.pc |
2048 | pkgconfig/gnunetstatistics.pc | 1389 | pkgconfig/gnunetstatistics.pc |
2049 | pkgconfig/gnunettestbed.pc | ||
2050 | pkgconfig/gnunettesting.pc | 1390 | pkgconfig/gnunettesting.pc |
2051 | pkgconfig/gnunettransport.pc | 1391 | pkgconfig/gnunettransport.pc |
2052 | pkgconfig/gnunetutil.pc | 1392 | pkgconfig/gnunetutil.pc |
2053 | pkgconfig/gnunetvpn.pc | 1393 | pkgconfig/gnunetvpn.pc |
2054 | ]) | 1394 | ]) |
2055 | AC_OUTPUT | ||
2056 | 1395 | ||
1396 | AC_OUTPUT | ||
2057 | 1397 | ||
2058 | # FIXME: `some modules' -> be more specific which exact modules. | 1398 | # notice about Java ports |
2059 | |||
2060 | # java ports | ||
2061 | AS_IF([test "x$enable_java_ports" = "xyes"], | 1399 | AS_IF([test "x$enable_java_ports" = "xyes"], |
2062 | [AC_MSG_NOTICE([Opening TCP ports by default to enable gnunet-java bindings.])]) | 1400 | [AC_MSG_NOTICE([Opening TCP ports to enable gnunet-java bindings]) |
1401 | java_msg="yes"], | ||
1402 | [java_msg="no"]) | ||
2063 | 1403 | ||
2064 | #### | 1404 | # experimental code is enabled |
2065 | #### This could be moved to the checks above, | 1405 | AS_IF([test "x$enable_experimental" = "x1"], |
2066 | #### but for now let's keep it here. | 1406 | [experimental_msg="yes"], |
2067 | #### | 1407 | [experimental_msg="no"]) |
1408 | |||
1409 | # experimental code for transport is enabled | ||
2068 | transport_msg="tcp udp unix http" | 1410 | transport_msg="tcp udp unix http" |
2069 | AS_IF([test "x$build_target" = "xlinux" -a "x$enable_experimental" = "xyes"], | 1411 | AS_IF([test "x$build_target" = "xlinux" && test "x$enable_experimental" = "x1"], |
2070 | [transport_msg="$transport_msg wlan"]) | 1412 | [transport_msg="tcp udp unix http wlan"]) |
2071 | # -- print message regarding enabled experimental features | 1413 | |
2072 | experimental_msg="no" | 1414 | # libidn version |
2073 | AS_IF([test "x$enable_experimental" = "xyes"], | 1415 | AS_IF([test "x$libidn_version" = "x2"], |
2074 | [experimental_msg="yes"]) | 1416 | [libidn_msg="libidn2"], |
2075 | # -- libidn 2 | 1417 | [libidn_msg="libidn"]) |
2076 | AS_IF([test "x$working_libidn2" = x1], | 1418 | |
2077 | [libidn2_msg="libidn2"]) | 1419 | # mandoc |
2078 | # -- libidn 1 | 1420 | AS_IF([test "x$MANDOC_BINARY" = "xfalse"], |
2079 | AS_IF([test "x$working_libidn1" = x1], | 1421 | [mandoc_msg="no"], |
2080 | [libidn1_msg="libidn1"]) | 1422 | [mandoc_msg="yes"]) |
2081 | # -- texi2mdoc-generation | 1423 | |
2082 | AS_IF([test "x$texi2mdoc_generation" = "xyes"], | 1424 | # doxy |
2083 | [mdocml_msg="yes"], | 1425 | AS_IF([$DOXY_BINARY], |
2084 | [mdocml_msg="no"]) | 1426 | [doxy_msg="yes"], |
2085 | # -- texi2mdoc | 1427 | [doxy_msg="no"]) |
2086 | AS_IF([test "x$TEXI2MDOC_BINARY" = "false"], | 1428 | |
2087 | [AC_MSG_NOTICE([texi2mdoc binary not found (will not generate mdoc documentation)]) | 1429 | # conversation |
2088 | texi2mdoc_msg="no (optional)"], | ||
2089 | [texi2mdoc_msg="yes"]) | ||
2090 | # -- mandoc | ||
2091 | AS_IF([test "x$MANDOC_BINARY" = "false"], | ||
2092 | [AC_MSG_NOTICE([mandoc binary not found (will not generate handbook as man page)]) | ||
2093 | mandoc_msg="no"], | ||
2094 | [mandoc_msg="yes"]) | ||
2095 | # -- texinfo | ||
2096 | AS_IF([test "x$makeinfo" != "x1"], | ||
2097 | [texinfo_msg="no"], | ||
2098 | [texinfo_msg="yes"]) | ||
2099 | # -- conversation | ||
2100 | conversation_msg="no" | 1430 | conversation_msg="no" |
1431 | AS_IF([test "x$pulse" = "x1"], | ||
1432 | [libpulse_msg="yes"], | ||
1433 | [libpulse_msg="no"]) | ||
1434 | AS_IF([test "x$opus" = "x1"], | ||
1435 | [libopus_msg="yes"], | ||
1436 | [libopus_msg="no"]) | ||
1437 | gstreamer_msg="no" | ||
2101 | AS_IF([test "x$conversation_backend" = "xnone"], | 1438 | AS_IF([test "x$conversation_backend" = "xnone"], |
2102 | [AS_IF([test "x$pulse" != "x1"], | 1439 | [AS_IF([test "x$pulse" != "x1"], |
2103 | [libpulse_msg="no (required for conversation)"], | 1440 | [libpulse_msg="no (required to build conversation)"], |
2104 | [libpulse_msg="yes"]) | 1441 | [libpulse_msg="yes"]) |
2105 | AS_IF([test "x$opus" != "x1"], | 1442 | AS_IF([test "x$opus" != "x1"], |
2106 | [libopus_msg="no (required for conversation)"], | 1443 | [libopus_msg="no (required to build conversation)"], |
2107 | [libopus_msg="yes"]) | 1444 | [libopus_msg="yes"]) |
2108 | AS_IF([test "x$gst" != "x1"], | 1445 | AS_IF([test "x$gst" != "x1"], |
2109 | [gstreamer_msg="no (required for conversation)"], | 1446 | [gstreamer_msg="no (required to build conversation)"], |
2110 | [gstreamer_msg="yes"])], | 1447 | [gstreamer_msg="yes"])], |
2111 | [AS_IF([test "x$opus" = x1], | 1448 | [AS_IF([test "x$opus" = "x1"], |
2112 | [conversation_msg="yes (x$conversation_backend)"], | 1449 | [conversation_msg="yes ($conversation_backend)"], |
2113 | [AC_MSG_WARN([libopus not found (required to build conversation)])])]) | 1450 | [conversation_msg="no"])]) |
2114 | 1451 | ||
2115 | # -- interface | 1452 | # default network interface |
2116 | interface_msg=`echo $DEFAULT_INTERFACE | tr -d \"` | 1453 | interface_msg=$(echo "$DEFAULT_INTERFACE" | tr -d \") |
2117 | # -- jansson | 1454 | |
2118 | # -- libextractor | 1455 | # libextractor |
2119 | AS_IF([test "$extractor" != 1], | 1456 | AS_IF([test "x$extractor" = "x0"], |
2120 | [AC_MSG_WARN([libextractor not found, but various file-sharing functions require it])], | 1457 | [libextractor_msg="no" |
2121 | [libextractor_msg="yes"]) | 1458 | AC_MSG_WARN([libextractor not found, but various file-sharing operations require it])], |
2122 | # -- libzbar | 1459 | [libextractor_msg="yes"]) |
1460 | |||
1461 | AC_SUBST([extractor]) | ||
1462 | |||
1463 | # libzbar | ||
2123 | AS_IF([test "x$zbar" = "x1"], | 1464 | AS_IF([test "x$zbar" = "x1"], |
2124 | [libzbar_msg="yes"], | 1465 | [libzbar_msg="yes"], |
2125 | [libzbar_msg="no (gnunet-qr will not be built)"]) | 1466 | [libzbar_msg="no"]) |
2126 | # -- libgnurl | 1467 | |
2127 | AS_IF([test "$gnurl" = "0"], | 1468 | # libpng |
2128 | [AS_IF([test "x$curl" = "xfalse"], | 1469 | AS_IF([test "x$png" = "x1"], |
2129 | [AC_MSG_WARN([libgnurl not found. http client support will not be compiled.]) | 1470 | [libpng_msg="yes"], |
2130 | AC_MSG_WARN([IMPORTANT: No HTTP client library found. HTTP transports and hostlist daemon will not be compiled, and you probably WANT the hostlist daemon]) | 1471 | [libpng_msg="no"]) |
2131 | http_client="none"], | 1472 | |
2132 | [AC_MSG_NOTICE([Using libcurl as HTTP client library.]) | 1473 | AS_IF([test "x$curl_gnutls" = "x0"], |
2133 | http_client="curl"])], | 1474 | [curl_tls_backend="OpenSSL"], |
2134 | [AC_MSG_NOTICE([Using libgnurl as HTTP client library.]) | 1475 | [curl_tls_backend="GnuTLS"]) |
2135 | http_client="gnurl"]) | 1476 | |
2136 | AS_IF([test "x$curl" = "xtrue" -a "x$curl_gnutls" != "xtrue"], | 1477 | # ifconfig |
2137 | [AC_MSG_WARN([libcurl TLS backend is not gnutls. The GNS Proxy will likely not function properly.]) | 1478 | AS_IF([test "x$IFCONFIG_BINARY" = "xfalse"], |
2138 | http_client="curl-openssl"], | 1479 | [ifconfig_msg="no (some features might not work)"], |
2139 | [http_client="curl-gnutls"]) | 1480 | [ifconfig_msg="yes"]) |
2140 | # -- ifconfig | 1481 | |
2141 | AS_IF([test "$VAR_IFCONFIG_BINARY" = "false"], | 1482 | # upnpc |
2142 | [ifconfig_msg="no (optional, some features will not work)"], | 1483 | AS_IF([test "x$UPNPC_BINARY" = "xfalse"], |
2143 | [ifconfig_msg="yes"]) | 1484 | [upnpc_msg="no (NAT traversal might not work)"], |
2144 | # -- upnpc | 1485 | [upnpc_msg="yes"]) |
2145 | AS_IF([test "$VAR_UPNPC_BINARY" = "false"], | 1486 | |
2146 | [upnpc_msg="no (optional, NAT traversal using UPnPc will not work)"], | 1487 | # iptables |
2147 | [upnpc_msg="yes"]) | 1488 | AS_IF([test "x$IPTABLES_BINARY" = "xfalse"], |
2148 | # -- iptables | 1489 | [iptables_msg="no (DNS query interception might not work)"], |
2149 | AS_IF([test "$VAR_IPTABLES_BINARY" = "false"], | 1490 | [iptables_msg="yes"]) |
2150 | [iptables_msg="no (optional, DNS query interception will not work)"], | 1491 | |
2151 | [iptables_msg="yes"]) | 1492 | # bluetooth |
2152 | # -- bluetooth | ||
2153 | AS_IF([test "x$bluetooth" = "x0"], | 1493 | AS_IF([test "x$bluetooth" = "x0"], |
2154 | [bluetooth_msg="no (optional)"], | 1494 | [bluetooth_msg="no"], |
2155 | [bluetooth_msg="yes" | 1495 | [bluetooth_msg="yes"]) |
2156 | transport_msg="$transport_msg bluetooth"]) | 1496 | |
2157 | # -- gnutls | 1497 | # gnutls |
2158 | AS_IF([test x$gnutls != xtrue], | 1498 | AS_IF([test "x$gnutls" = "x0"], |
2159 | [AC_MSG_WARN([GnuTLS not found, gnunet-gns-proxy will not be built]) | 1499 | [gnutls_msg="no"], |
2160 | gnutls_msg="no (gnunet-gns-proxy will not be built)"], | 1500 | [AS_IF([test "x$gnutls_dane" = "x0"], |
2161 | [AS_IF([test "x$gnutls_dane" != "x1"], | 1501 | [gnutls_msg="yes (without DANE support)" |
2162 | [AC_MSG_WARN([GnuTLS lacks DANE support, DANE validation will not be possible]) | 1502 | AC_MSG_WARN([GnuTLS lacks DANE support; validation using it will not be possible])], |
2163 | gnutls_msg="yes (without DANE support)"], | 1503 | [gnutls_msg="yes (with DANE support)"])]) |
2164 | [gnutls_msg="yes (with DANE support)"])]) | 1504 | |
2165 | # -- databases | 1505 | # pdflatex |
2166 | # TODO: this always returns true, the check might | 1506 | AS_IF([test "x$PDFLATEX_BINARY" = "xfalse"], |
2167 | # TODO: not be working as intended (for msqlfail). | 1507 | [latex_msg="no"], |
2168 | AS_IF([test "$mysql" = true], | 1508 | [latex_msg="yes"]) |
2169 | [features_msg="$features_msg mysql" | 1509 | |
2170 | mysql_msg="yes"], | 1510 | # database backends |
2171 | [mysql_msg="no"]) | 1511 | features_msg="" |
2172 | AS_IF([test x$mysqlfail = xtrue], | 1512 | |
2173 | [AC_MSG_WARN([MySQL not found (or too old), will not create MySQL database support]) | 1513 | AS_IF([test "x$sqlite3" = "x1"], |
2174 | mysql_msg="unsupported version"]) | 1514 | [sqlite_msg="yes" |
2175 | AS_IF([test "$sqlite" = true], | 1515 | features_msg="sqlite $features_msg"], |
2176 | [features_msg="$features_msg sqlite" | 1516 | [sqlite_msg="no"]) |
2177 | sqlite_msg="yes"], | 1517 | |
2178 | [AC_MSG_ERROR([sqlite3 not found, but sqlite3 is required.]) | 1518 | AS_IF([test "x$postgres" = "x1"], |
2179 | sqlite_msg="no"]) | 1519 | [postgres_msg="yes" |
2180 | AS_IF([test "$postgres" = true], | 1520 | features_msg="postgres $features_msg"], |
2181 | [features_msg="$features_msg postgres" | 1521 | [postgres_msg="no"]) |
2182 | postgres_msg="yes"], | 1522 | |
2183 | [postgres_msg="no"]) | 1523 | # Too new versions of Python might cause compatibility issues, so output a |
2184 | # -- features | 1524 | # warning when the version found goes above the recommended maximum version. |
2185 | # ---- 1. replace spaces with newlines, | 1525 | AS_VERSION_COMPARE([$PYTHON_VERSION],[3.8],[],[], |
2186 | # ---- 2. sort the lines, | 1526 | [AC_MSG_WARN([Your version of Python is not supported, you might see issues])]) |
2187 | # ---- 3. replace the newlines with spaces. | ||
2188 | features_msg=`echo $features_msg | tr ' ' '\012' | sort | tr '\012' ' '` | ||
2189 | AC_SUBST(features_msg) | ||
2190 | |||
2191 | |||
2192 | # The summary | ||
2193 | # TODO: reduce the length of the last message block, following "IMPORTANT". | ||
2194 | 1527 | ||
2195 | AC_MSG_NOTICE([ | 1528 | AC_MSG_NOTICE([ |
2196 | Detected system | 1529 | Detected system |
@@ -2198,59 +1531,65 @@ Detected system | |||
2198 | 1531 | ||
2199 | GNUnet version: ${VERSION} | 1532 | GNUnet version: ${VERSION} |
2200 | 1533 | ||
2201 | Host setup: ${host} | 1534 | Host Setup: ${host} |
2202 | Install prefix: ${prefix} | 1535 | Install Prefix: ${prefix} |
2203 | Compiler: ${CC} | 1536 | Compiler: ${CC} |
2204 | CFLAGS: ${CFLAGS} | 1537 | CFLAGS: ${CFLAGS} |
2205 | CPPFLAGS: ${CPPFLAGS} | 1538 | CPPFLAGS: ${CPPFLAGS} |
2206 | LDFLAGS: ${LDFLAGS} | 1539 | LDFLAGS: ${LDFLAGS} |
2207 | LIBS: ${LIBS} | 1540 | LIBS: ${LIBS} |
2208 | Build Target: $build_target | 1541 | Build Target: ${build_target} |
2209 | 1542 | ||
2210 | Default Interface: ${interface_msg} | 1543 | Default Interface: ${interface_msg} |
2211 | 1544 | ||
2212 | MySQL: ${mysql_msg} | ||
2213 | PostgreSQL: ${postgres_msg} | ||
2214 | sqlite3: ${sqlite_msg} | 1545 | sqlite3: ${sqlite_msg} |
2215 | http client: ${http_client} | 1546 | PostgreSQL: ${postgres_msg} |
2216 | bluetooth: ${bluetooth_msg} | 1547 | |
1548 | cURL TLS backend: ${curl_tls_backend} | ||
1549 | Bluetooth: ${bluetooth_msg} | ||
2217 | iptables: ${iptables_msg} | 1550 | iptables: ${iptables_msg} |
2218 | ifconfig: ${ifconfig_msg} | 1551 | ifconfig: ${ifconfig_msg} |
2219 | upnpc: ${upnpc_msg} | 1552 | UPnPc: ${upnpc_msg} |
2220 | gnutls: ${gnutls_msg} | 1553 | GnuTLS: ${gnutls_msg} |
1554 | |||
1555 | LaTeX: ${latex_msg} | ||
1556 | |||
1557 | libextractor: ${libextractor_msg} | ||
2221 | libzbar: ${libzbar_msg} | 1558 | libzbar: ${libzbar_msg} |
2222 | java: ${java_msg} | 1559 | libpng: ${libpng_msg} |
2223 | libidn: ${libidn1_msg}${libidn2_msg} | 1560 | libidn: ${libidn_msg} |
2224 | libopus: ${libopus_msg} | 1561 | libopus: ${libopus_msg} |
2225 | gstreamer: ${gstreamer_msg} | ||
2226 | libpulse: ${libpulse_msg} | 1562 | libpulse: ${libpulse_msg} |
2227 | libextractor: ${libextractor_msg} | 1563 | gstreamer: ${gstreamer_msg} |
2228 | texi2mdoc: ${texi2mdoc_msg} | 1564 | |
1565 | Java: ${java_msg} | ||
1566 | |||
1567 | doxygen: ${doxy_msg} | ||
2229 | mandoc: ${mandoc_msg} | 1568 | mandoc: ${mandoc_msg} |
2230 | 1569 | ||
2231 | GNUnet configuration: | 1570 | GNUnet configuration |
2232 | ===================== | 1571 | ==================== |
2233 | transports: ${transport_msg} | 1572 | |
2234 | conversation: ${conversation_msg} | 1573 | Transports: ${transport_msg} |
2235 | database backends: ${features_msg} | 1574 | Conversation: ${conversation_msg} |
2236 | experimental: ${experimental_msg} | 1575 | Database Backends ${features_msg} |
1576 | Experimental Code: ${experimental_msg} | ||
2237 | 1577 | ||
2238 | texinfo manual: ${texinfo_msg} | 1578 | Transpiled mdocml Manual: ${mdocml_msg} |
2239 | transpiled mdocml manual: ${mdocml_msg} | ||
2240 | ]) | 1579 | ]) |
2241 | 1580 | ||
2242 | AS_IF([test x$MSG_USER_SETUP != xfalse], | 1581 | AS_IF([test "x$MSG_USER_SETUP" != "xfalse"], |
2243 | [AC_MSG_WARN([Please make sure NOW to create a user and group 'gnunet' and additionally a group 'gnunetdns'. Make sure that '/var/lib/gnunet' is owned (and writable) by user 'gnunet'.]) | 1582 | [AC_MSG_WARN([Please make sure NOW to create a user and group 'gnunet' and additionally a group 'gnunetdns'. Make sure that '/var/lib/gnunet' is owned (and writable) by user 'gnunet'.]) |
2244 | AS_IF([test x$HAVE_GNUNET_USER != 0], | 1583 | AS_IF([test "x$HAVE_GNUNET_USER" != "x0"], |
2245 | [AC_MSG_NOTICE([To do this on this system, run: | 1584 | [AC_MSG_NOTICE([To do this on this system, run: |
2246 | # addgroup gnunetdns | 1585 | # addgroup gnunetdns |
2247 | # adduser --system --disabled-login --home /var/lib/gnunet gnunet | 1586 | # adduser --system --disabled-login --home /var/lib/gnunet gnunet |
2248 | ])]) | 1587 | ])]) |
2249 | AC_MSG_WARN([Each user of GNUnet should be added to the 'gnunet' group.]) | 1588 | AC_MSG_WARN([Each user of GNUnet should be added to the 'gnunet' group]) |
2250 | AS_IF([test x$HAVE_GNUNET_USER != 0], | 1589 | AS_IF([test "x$HAVE_GNUNET_USER" != "x0"], |
2251 | [AC_MSG_NOTICE([To do this on this system, run: | 1590 | [AC_MSG_NOTICE([To do this on this system, run: |
2252 | # adduser USERNAME gnunet | 1591 | # adduser USERNAME gnunet |
2253 | for each of your users, replacing \"USERNAME\" with the respective login name. Users may have to login again for the changes to take effect. | 1592 | for each of your users, replacing 'USERNAME' with the respective login name. |
2254 | ])])]) | 1593 | Users may have to login again for the changes to take effect.])])]) |
2255 | 1594 | ||
2256 | AC_MSG_NOTICE([For detailed setup instructions, type 'info gnunet' after the installation or visit https://docs.gnunet.org/]) | 1595 | AC_MSG_NOTICE([For detailed setup instructions, type 'info gnunet' after the installation or visit https://docs.gnunet.org/]) |