diff options
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 143 |
1 files changed, 64 insertions, 79 deletions
diff --git a/configure.ac b/configure.ac index f6b33dd02..2985b4807 100644 --- a/configure.ac +++ b/configure.ac | |||
@@ -334,6 +334,23 @@ AS_IF([test x"$VAR_IFCONFIG_BINARY" != x"false"], | |||
334 | [AC_MSG_WARN(['ifconfig' not found.])]) | 334 | [AC_MSG_WARN(['ifconfig' not found.])]) |
335 | 335 | ||
336 | 336 | ||
337 | # Test if 'adduser' binary exists | ||
338 | MSG_USER_SETUP=true | ||
339 | AC_PATH_PROG([MSG_USER_SETUP], | ||
340 | [adduser], | ||
341 | false, | ||
342 | [path=$PATH$PATH_SEPARATOR/usr/sbin$PATH_SEPARATOR/sbin]) | ||
343 | |||
344 | # Test if 'gnunet' user and the groups exist | ||
345 | getent passwd gnunet > /dev/null | ||
346 | HAVE_GNUNET_USER=$? | ||
347 | getent group gnunet > /dev/null | ||
348 | AS_IF([test x$? != x0], | ||
349 | [HAVE_GNUNET_USER=1]) | ||
350 | getent group gnunetdns > /dev/null | ||
351 | AS_IF([test x$? != x0], | ||
352 | [HAVE_GNUNET_USER=1]) | ||
353 | |||
337 | AC_PATH_TARGET_TOOL(VAR_SYSCTL_BINARY, sysctl, false) | 354 | AC_PATH_TARGET_TOOL(VAR_SYSCTL_BINARY, sysctl, false) |
338 | 355 | ||
339 | AC_CHECK_PROG(VAR_SYSCTL_BINARY, sysctl, true, false) | 356 | AC_CHECK_PROG(VAR_SYSCTL_BINARY, sysctl, true, false) |
@@ -1404,15 +1421,20 @@ AS_IF([test "$mysql" = "true" -a "x$enable_mysql_version_check" = "xyes"], | |||
1404 | #endif | 1421 | #endif |
1405 | int main () { return 0; } | 1422 | int main () { return 0; } |
1406 | ]]) | 1423 | ]]) |
1407 | ],mysql=true,mysql=false) | 1424 | ], |
1408 | AS_IF([test "$mysql" = "false"], | 1425 | [mysql=true], |
1426 | [mysql=false]) | ||
1427 | AS_IF([test x$mysql = xfalse], | ||
1409 | [ | 1428 | [ |
1410 | mysqlfail=true | 1429 | mysqlfail=true |
1411 | AC_MSG_RESULT([fail, >= 4.1 required]) | 1430 | AC_MSG_WARN([fail, MySQL >= 4.1 required]) |
1412 | ],[ | 1431 | ],[ |
1432 | AC_MSG_NOTICE([success, will keep $mysqlfail]) | ||
1433 | mysqlfail=false | ||
1413 | AC_MSG_RESULT(ok) | 1434 | AC_MSG_RESULT(ok) |
1414 | ]) | 1435 | ]) |
1415 | ]) | 1436 | ]) |
1437 | |||
1416 | AM_CONDITIONAL(HAVE_MYSQL, test x$mysql = xtrue) | 1438 | AM_CONDITIONAL(HAVE_MYSQL, test x$mysql = xtrue) |
1417 | AM_CONDITIONAL(HAVE_MYSQLE, false) | 1439 | AM_CONDITIONAL(HAVE_MYSQLE, false) |
1418 | # restore LIBS | 1440 | # restore LIBS |
@@ -1988,19 +2010,13 @@ AC_OUTPUT | |||
1988 | 2010 | ||
1989 | # java ports | 2011 | # java ports |
1990 | AS_IF([test "x$enable_java_ports" = "xyes"], | 2012 | AS_IF([test "x$enable_java_ports" = "xyes"], |
1991 | [AC_MSG_NOTICE([NOTICE: Opening ports for gnunet-java bindings by default.])]) | 2013 | [AC_MSG_NOTICE([Opening TCP ports by default to enable gnunet-java bindings.])]) |
1992 | 2014 | ||
1993 | #### | 2015 | #### |
1994 | #### Lasciate ogne speranza, voi ch'intrate | ||
1995 | #### | ||
1996 | #### This could be moved to the checks above, | 2016 | #### This could be moved to the checks above, |
1997 | #### but for now let's keep it here. | 2017 | #### but for now let's keep it here. |
1998 | #### | 2018 | #### |
1999 | 2019 | ||
2000 | # TODO: We use "WARNING" too often, we need to clarify what | ||
2001 | # TODO: constitutes a WARNING, an ERROR, and a NOTICE, and | ||
2002 | # TODO: other message levels. | ||
2003 | |||
2004 | # -- print message regarding enabled experimental features | 2020 | # -- print message regarding enabled experimental features |
2005 | AS_IF([test "x$enable_experimental" = "xyes"], | 2021 | AS_IF([test "x$enable_experimental" = "xyes"], |
2006 | [experimental_msg="experimental features enabled"]) | 2022 | [experimental_msg="experimental features enabled"]) |
@@ -2020,12 +2036,12 @@ AS_IF([test "x$texi2mdoc_generation" = "xyes"], | |||
2020 | [mdocml_msg="no"]) | 2036 | [mdocml_msg="no"]) |
2021 | # -- texi2mdoc | 2037 | # -- texi2mdoc |
2022 | AS_IF([test "x$TEXI2MDOC_BINARY" = "false"], | 2038 | AS_IF([test "x$TEXI2MDOC_BINARY" = "false"], |
2023 | [AC_MSG_NOTICE([WARNING: optional texi2mdoc binary not found]) | 2039 | [AC_MSG_NOTICE([texi2mdoc binary not found (will not generate mdoc documentation)]) |
2024 | texi2mdoc_msg="no (optional)"], | 2040 | texi2mdoc_msg="no (optional)"], |
2025 | [texi2mdoc_msg="yes"]) | 2041 | [texi2mdoc_msg="yes"]) |
2026 | # -- mandoc | 2042 | # -- mandoc |
2027 | AS_IF([test "x$MANDOC_BINARY" = "false"], | 2043 | AS_IF([test "x$MANDOC_BINARY" = "false"], |
2028 | [AC_MSG_NOTICE([WARNING: optional mandoc binary not found]) | 2044 | [AC_MSG_NOTICE([mandoc binary not found (will not generate handbook as man page)]) |
2029 | mandoc_msg="no"], | 2045 | mandoc_msg="no"], |
2030 | [mandoc_msg="yes"]) | 2046 | [mandoc_msg="yes"]) |
2031 | # -- texinfo | 2047 | # -- texinfo |
@@ -2035,15 +2051,15 @@ AS_IF([test "x$makeinfo" != "x1"], | |||
2035 | # -- conversation | 2051 | # -- conversation |
2036 | AS_IF([test "x$conversation_backend" = "xnone"], | 2052 | AS_IF([test "x$conversation_backend" = "xnone"], |
2037 | [AS_IF([test "x$pulse" != "x1"], | 2053 | [AS_IF([test "x$pulse" != "x1"], |
2038 | [AC_MSG_NOTICE([WARNING: libpulse(audio) not found (required to build conversation against it).]) | 2054 | [AC_MSG_WARN([libpulse(audio) not found (required to build conversation).]) |
2039 | libpulse_msg="no"], | 2055 | libpulse_msg="no"], |
2040 | [libpulse_msg="yes"]) | 2056 | [libpulse_msg="yes"]) |
2041 | AS_IF([test "x$opus" != "x1"], | 2057 | AS_IF([test "x$opus" != "x1"], |
2042 | [AC_MSG_NOTICE([WARNING: libopus not found (conversation)]) | 2058 | [AC_MSG_WARN([libopus not found (required to build conversation)]) |
2043 | libopus_msg="no"], | 2059 | libopus_msg="no"], |
2044 | [libopus_msg="yes"]) | 2060 | [libopus_msg="yes"]) |
2045 | AS_IF([test "x$gst" != "x1"], | 2061 | AS_IF([test "x$gst" != "x1"], |
2046 | [AC_MSG_NOTICE([WARNING: GStreamer not found (required to build conversation against it).]) | 2062 | [AC_MSG_WARN([GStreamer not found (required to build conversation).]) |
2047 | gstreamer_msg="no"], | 2063 | gstreamer_msg="no"], |
2048 | [gstreamer_msg="yes"])], | 2064 | [gstreamer_msg="yes"])], |
2049 | [features_msg="$features_msg conversation"]) | 2065 | [features_msg="$features_msg conversation"]) |
@@ -2059,64 +2075,65 @@ AS_IF([test "x$jansson" = "x0"], | |||
2059 | [jansson_msg="yes"]) | 2075 | [jansson_msg="yes"]) |
2060 | # -- libextractor | 2076 | # -- libextractor |
2061 | AS_IF([test "$extractor" != 1], | 2077 | AS_IF([test "$extractor" != 1], |
2062 | [AC_MSG_WARN([WARNING: libextractor not found, but various file-sharing functions require it])], | 2078 | [AC_MSG_WARN([libextractor not found, but various file-sharing functions require it])], |
2063 | [libextractor_msg="yes"]) | 2079 | [libextractor_msg="yes"]) |
2064 | # -- libzbar | 2080 | # -- libzbar |
2065 | AS_IF([test "x$zbar" = "x1"], | 2081 | AS_IF([test "x$zbar" = "x1"], |
2066 | [libzbar_msg="yes" | 2082 | [libzbar_msg="yes" |
2067 | features_msg="$features_msg gnunet-qr"], | 2083 | features_msg="$features_msg gnunet-qr"], |
2068 | [AC_MSG_NOTICE([WARNING: zbar not found, gnunet-qr will not be built.]) | 2084 | [AC_MSG_NOTICE([zbar not found, gnunet-qr will not be built.]) |
2069 | libzbar_msg="no"]) | 2085 | libzbar_msg="no"]) |
2070 | # -- libgnurl | 2086 | # -- libgnurl |
2071 | AS_IF([test "$gnurl" = "0"], | 2087 | AS_IF([test "$gnurl" = "0"], |
2072 | [AS_IF([test "x$curl" = "xfalse"], | 2088 | [AS_IF([test "x$curl" = "xfalse"], |
2073 | [AC_MSG_NOTICE([WARNING: libgnurl not found. http client support will not be compiled.]) | 2089 | [AC_MSG_WARN([libgnurl not found. http client support will not be compiled.]) |
2074 | AC_MSG_WARN([ERROR: libgnurl not found. hostlist daemon will not be compiled, and you probably WANT the hostlist daemon]) | 2090 | 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]) |
2075 | curl_msg="no"], | 2091 | curl_msg="no"], |
2076 | [AC_MSG_NOTICE([WARNING: libgnurl not found, trying to use libcurl-gnutls instead.]) | 2092 | [AC_MSG_NOTICE([libgnurl not found, trying to use libcurl-gnutls instead.]) |
2077 | curl_msg="yes"])], | 2093 | curl_msg="yes"])], |
2078 | [gnurl_msg="yes"]) | 2094 | [gnurl_msg="yes"]) |
2079 | # -- ifconfig | 2095 | # -- ifconfig |
2080 | AS_IF([test "$VAR_IFCONFIG_BINARY" = "false"], | 2096 | AS_IF([test "$VAR_IFCONFIG_BINARY" = "false"], |
2081 | [AC_MSG_NOTICE([WARNING: optional ifconfig not found]) | 2097 | [AC_MSG_WARN([ifconfig not found, some features will not work]) |
2082 | ifconfig_msg="no (optional)"], | 2098 | ifconfig_msg="no (optional)"], |
2083 | [ifconfig_msg="yes"]) | 2099 | [ifconfig_msg="yes"]) |
2084 | # -- upnpc | 2100 | # -- upnpc |
2085 | AS_IF([test "$VAR_UPNPC_BINARY" = "false"], | 2101 | AS_IF([test "$VAR_UPNPC_BINARY" = "false"], |
2086 | [AC_MSG_NOTICE([WARNING: optional upnpc binary not found]) | 2102 | [AC_MSG_WARN([upnpc binary not found, NAT traversal using UPnPc will not work]) |
2087 | upnpc_msg="no (optional)"], | 2103 | upnpc_msg="no (optional)"], |
2088 | [upnpc_msg="yes"]) | 2104 | [upnpc_msg="yes"]) |
2089 | # -- iptables | 2105 | # -- iptables |
2090 | AS_IF([test "$VAR_IPTABLES_BINARY" = "false"], | 2106 | AS_IF([test "$VAR_IPTABLES_BINARY" = "false"], |
2091 | [AC_MSG_NOTICE([WARNING: optional iptables not found]) | 2107 | [AC_MSG_WARN([iptables not found, DNS query interception will not work]) |
2092 | iptables_msg="no (optional)"], | 2108 | iptables_msg="no (optional)"], |
2093 | [iptables_msg="yes"]) | 2109 | [iptables_msg="yes"]) |
2094 | # -- bluetooth | 2110 | # -- bluetooth |
2095 | AS_IF([test "x$bluetooth" = "x0"], | 2111 | AS_IF([test "x$bluetooth" = "x0"], |
2096 | [AC_MSG_NOTICE([WARNING: optional bluetooth library not found.]) | 2112 | [AC_MSG_NOTICE([bluetooth library not found, will not be able to use Bluetooth]) |
2097 | bluetooth_msg="no (optional)"], | 2113 | bluetooth_msg="no (optional)"], |
2098 | [bluetooth_msg="yes"]) | 2114 | [bluetooth_msg="yes"]) |
2099 | # -- gnutls | 2115 | # -- gnutls |
2100 | AS_IF([test x$gnutls != xtrue], | 2116 | AS_IF([test x$gnutls != xtrue], |
2101 | [AC_MSG_NOTICE([WARNING: GnuTLS not found, gnunet-gns-proxy will not be built]) | 2117 | [AC_MSG_WARN([GnuTLS not found, gnunet-gns-proxy will not be built]) |
2102 | gnutls_msg="no"], | 2118 | gnutls_msg="no"], |
2103 | [AS_IF([test "x$gnutls_dane" != "x1"], | 2119 | [AS_IF([test "x$gnutls_dane" != "x1"], |
2104 | [AC_MSG_NOTICE([WARNING: GnuTLS has no DANE support, DANE validation will not be possible]) | 2120 | [AC_MSG_WARN([GnuTLS lacks DANE support, DANE validation will not be possible]) |
2105 | gnutls_msg="yes (without DANE support)"], | 2121 | gnutls_msg="yes (without DANE support)"], |
2106 | [gnutls_msg="yes (with DANE support)"])]) | 2122 | [gnutls_msg="yes (with DANE support)"])]) |
2107 | # -- databases | 2123 | # -- databases |
2108 | # TODO: this always returns true, the check might | 2124 | # TODO: this always returns true, the check might |
2109 | # TODO: not be working as intended (for msqlfail). | 2125 | # TODO: not be working as intended (for msqlfail). |
2110 | AS_IF([test x$mysqlfail = "true"] | ||
2111 | [AC_MSG_NOTICE([WARNING: optional MySQL not found (or too old)])]) | ||
2112 | AS_IF([test "$mysql" = true], | 2126 | AS_IF([test "$mysql" = true], |
2113 | [features_msg="$features_msg mysql" | 2127 | [features_msg="$features_msg mysql" |
2114 | mysql_msg="yes"], | 2128 | mysql_msg="yes"], |
2115 | [mysql_msg="no"]) | 2129 | [mysql_msg="no"]) |
2130 | AS_IF([test x$mysqlfail = xtrue], | ||
2131 | [AC_MSG_WARN([MySQL not found (or too old), will not create MySQL database support]) | ||
2132 | mysql_msg="unsupported version"]) | ||
2116 | AS_IF([test "$sqlite" = true], | 2133 | AS_IF([test "$sqlite" = true], |
2117 | [features_msg="$features_msg sqlite" | 2134 | [features_msg="$features_msg sqlite" |
2118 | sqlite_msg="yes"], | 2135 | sqlite_msg="yes"], |
2119 | [AC_MSG_ERROR([ERROR: sqlite3 not found, but sqlite3 is required.]) | 2136 | [AC_MSG_ERROR([sqlite3 not found, but sqlite3 is required.]) |
2120 | sqlite_msg="no"]) | 2137 | sqlite_msg="no"]) |
2121 | AS_IF([test "$postgres" = true], | 2138 | AS_IF([test "$postgres" = true], |
2122 | [features_msg="$features_msg postgres" | 2139 | [features_msg="$features_msg postgres" |
@@ -2135,8 +2152,9 @@ AC_SUBST(features_msg) | |||
2135 | 2152 | ||
2136 | AC_MSG_NOTICE([ | 2153 | AC_MSG_NOTICE([ |
2137 | GNUnet Configuration | 2154 | GNUnet Configuration |
2155 | ==================== | ||
2138 | 2156 | ||
2139 | gnunet version: ${VERSION} | 2157 | GNUnet version: ${VERSION} |
2140 | 2158 | ||
2141 | Host setup: ${host} | 2159 | Host setup: ${host} |
2142 | Install prefix: ${prefix} | 2160 | Install prefix: ${prefix} |
@@ -2177,53 +2195,20 @@ transpiled mdocml manual: ${mdocml_msg} | |||
2177 | 2195 | ||
2178 | features: ${features_msg} | 2196 | features: ${features_msg} |
2179 | experimental: ${experimental_msg} | 2197 | experimental: ${experimental_msg} |
2180 | |||
2181 | |||
2182 | IMPORTANT: | ||
2183 | |||
2184 | Please make sure NOW that you have created a user and group 'gnunet' | ||
2185 | and additionally a group 'gnunetdns'. On Debian and Ubuntu GNU/Linux, | ||
2186 | type: | ||
2187 | |||
2188 | addgroup gnunetdns | ||
2189 | adduser --system --group --disabled-login --home /var/lib/gnunet gnunet | ||
2190 | |||
2191 | Make sure that '/var/lib/gnunet' is owned (and writable) by user | ||
2192 | 'gnunet'. Then, you can compile GNUnet with | ||
2193 | |||
2194 | make | ||
2195 | |||
2196 | After that, run (if necessary as 'root') | ||
2197 | |||
2198 | make install | ||
2199 | |||
2200 | to install everything. | ||
2201 | |||
2202 | Each GNUnet user should be added to the 'gnunet' group (may | ||
2203 | require fresh login to come into effect): | ||
2204 | |||
2205 | adduser USERNAME gnunet | ||
2206 | |||
2207 | (run the above command as root once for each of your users, replacing | ||
2208 | "USERNAME" with the respective login names). If you have a global IP | ||
2209 | address, no further configuration is required. | ||
2210 | |||
2211 | For more detailed setup instructions, see https://docs.gnunet.org/ | ||
2212 | |||
2213 | Optionally, download and compile gnunet-gtk to get a GUI for | ||
2214 | file-sharing and configuration. This is particularly recommended | ||
2215 | if your network setup is non-trivial, as gnunet-setup can be | ||
2216 | used to test in the GUI if your network configuration is working. | ||
2217 | gnunet-setup should be run as the "gnunet" user under X. As it | ||
2218 | does very little with the network, running it as "root" is likely | ||
2219 | also harmless. You can also run it as a normal user, but then | ||
2220 | you have to copy ~/.gnunet/gnunet.conf" over to the "gnunet" user's | ||
2221 | home directory in the end. | ||
2222 | |||
2223 | Once you have configured your peer, run (as the 'gnunet' user) | ||
2224 | |||
2225 | gnunet-arm -s | ||
2226 | |||
2227 | to start the peer. You can then run the various GNUnet-tools as | ||
2228 | your "normal" user (who should only be in the group 'gnunet'). | ||
2229 | ]) | 2198 | ]) |
2199 | |||
2200 | AS_IF([test x$MSG_USER_SETUP != xfalse], | ||
2201 | [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'.]) | ||
2202 | AS_IF([test x$HAVE_GNUNET_USER != 0], | ||
2203 | [AC_MSG_NOTICE([To do this on this system, run: | ||
2204 | # addgroup gnunetdns | ||
2205 | # adduser --system --disabled-login --home /var/lib/gnunet gnunet | ||
2206 | ])]) | ||
2207 | AC_MSG_WARN([Each user of GNUnet should be added to the 'gnunet' group.]) | ||
2208 | AS_IF([test x$HAVE_GNUNET_USER != 0], | ||
2209 | [AC_MSG_NOTICE([To do this on this system, run: | ||
2210 | # adduser USERNAME gnunet | ||
2211 | for each of your users, replacing \"USERNAME\" with the respective login name. Users may have to login again for the changes to take effect. | ||
2212 | ])])]) | ||
2213 | |||
2214 | AC_MSG_NOTICE([For detailed setup instructions, type 'info gnunet' after the installation or visit https://docs.gnunet.org/]) | ||