diff options
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 163 |
1 files changed, 132 insertions, 31 deletions
diff --git a/configure.ac b/configure.ac index 0162f39f4..53539cbb0 100644 --- a/configure.ac +++ b/configure.ac | |||
@@ -1,20 +1,18 @@ | |||
1 | # This file is part of GNUnet. | 1 | # This file is part of GNUnet. |
2 | # (C) 2001--2018 GNUnet e.V. | 2 | # (C) 2001--2018 GNUnet e.V. |
3 | # | 3 | # |
4 | # GNUnet is free software; you can redistribute it and/or modify | 4 | # GNUnet is free software: you can redistribute it and/or modify it |
5 | # it under the terms of the GNU General Public License as published | 5 | # under the terms of the GNU Affero General Public License as published |
6 | # by the Free Software Foundation; either version 3, or (at your | 6 | # by the Free Software Foundation, either version 3 of the License, |
7 | # option) any later version. | 7 | # or (at your option) any later version. |
8 | # | 8 | # |
9 | # GNUnet is distributed in the hope that it will be useful, but | 9 | # GNUnet is distributed in the hope that it will be useful, but |
10 | # WITHOUT ANY WARRANTY; without even the implied warranty of | 10 | # WITHOUT ANY WARRANTY; without even the implied warranty of |
11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
12 | # General Public License for more details. | 12 | # Affero General Public License for more details. |
13 | # | 13 | # |
14 | # You should have received a copy of the GNU General Public License | 14 | # You should have received a copy of the GNU Affero General Public License |
15 | # along with GNUnet; see the file COPYING. If not, write to the | 15 | # along with this program. If not, see <http://www.gnu.org/licenses/>. |
16 | # Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | ||
17 | # Boston, MA 02110-1301, USA. | ||
18 | # | 16 | # |
19 | # | 17 | # |
20 | # Process this file with autoconf to produce a configure script. | 18 | # Process this file with autoconf to produce a configure script. |
@@ -22,7 +20,7 @@ | |||
22 | # | 20 | # |
23 | AC_PREREQ(2.61) | 21 | AC_PREREQ(2.61) |
24 | # Checks for programs. | 22 | # Checks for programs. |
25 | AC_INIT([gnunet], [0.11.0], [bug-gnunet@gnu.org]) | 23 | AC_INIT([gnunet], [0.11.0pre66], [bug-gnunet@gnu.org]) |
26 | 24 | ||
27 | AC_CANONICAL_TARGET | 25 | AC_CANONICAL_TARGET |
28 | AC_CANONICAL_HOST | 26 | AC_CANONICAL_HOST |
@@ -60,7 +58,7 @@ fi | |||
60 | # Use Linux interface name unless the OS has a different preference | 58 | # Use Linux interface name unless the OS has a different preference |
61 | DEFAULT_INTERFACE="\"eth0\"" | 59 | DEFAULT_INTERFACE="\"eth0\"" |
62 | 60 | ||
63 | funcstocheck="getnameinfo gethostname gethostbyname gethostbyaddr getaddrinfo" | 61 | funcstocheck="getnameinfo gethostname gethostbyname gethostbyaddr getaddrinfo getaddrinfo_a" |
64 | 62 | ||
65 | # Srcdir in a form that native compiler understands (i.e. DOS path on W32) | 63 | # Srcdir in a form that native compiler understands (i.e. DOS path on W32) |
66 | native_srcdir=$srcdir | 64 | native_srcdir=$srcdir |
@@ -200,11 +198,62 @@ AC_CHECK_LIB(c, getloadavg, AC_DEFINE(HAVE_GETLOADAVG,1,[getloadavg supported])) | |||
200 | AC_CHECK_PROG(VAR_GETOPT_BINARY, getopt, true, false) | 198 | AC_CHECK_PROG(VAR_GETOPT_BINARY, getopt, true, false) |
201 | AM_CONDITIONAL(HAVE_GETOPT_BINARY, $VAR_GETOPT_BINARY) | 199 | AM_CONDITIONAL(HAVE_GETOPT_BINARY, $VAR_GETOPT_BINARY) |
202 | 200 | ||
203 | AC_CHECK_PROG(VAR_SSH_BINARY,ssh,true,false) | 201 | AC_CHECK_PROG(VAR_SSH_BINARY, ssh, true, false) |
204 | AM_CONDITIONAL(HAVE_SSH_BINARY, $VAR_SSH_BINARY) | 202 | AM_CONDITIONAL(HAVE_SSH_BINARY, $VAR_SSH_BINARY) |
205 | 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) | 203 | 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) |
206 | rm -f /tmp/gnunet_test_cosks_ssh_garbage | 204 | rm -f /tmp/gnunet_test_cosks_ssh_garbage |
207 | 205 | ||
206 | # iptables is a soft requirement to run tests | ||
207 | AC_PATH_TARGET_TOOL(VAR_IPTABLES_BINARY, iptables, false) | ||
208 | |||
209 | if test x"$VAR_IPTABLES_BINARY" != x"false" | ||
210 | then | ||
211 | if test -x "/sbin/iptables" | ||
212 | then | ||
213 | VAR_IPTABLES_BINARY="/sbin/iptables" | ||
214 | elif test -x "/usr/sbin/iptables" | ||
215 | then | ||
216 | VAR_IPTABLES_BINARY="/usr/sbin/iptables" | ||
217 | fi | ||
218 | fi | ||
219 | |||
220 | if test x"$VAR_IPTABLES_BINARY" != x"false" | ||
221 | then | ||
222 | AC_DEFINE_UNQUOTED([IPTABLES], "$VAR_IPTABLES_BINARY", [Path to iptables]) | ||
223 | else | ||
224 | AC_MSG_WARN([warning: 'iptables' not found.]) | ||
225 | fi | ||
226 | |||
227 | AC_PATH_TARGET_TOOL(VAR_IFCONFIG_BINARY, ifconfig, false) | ||
228 | |||
229 | AC_CHECK_PROG(VAR_IFCONFIG_BINARY, ifconfig, true, false) | ||
230 | if test x"$VAR_IFCONFIG_BINARY" != x"false" | ||
231 | then | ||
232 | if test -x "/sbin/ifconfig" | ||
233 | then | ||
234 | VAR_IFCONFIG_BINARY="/sbin/ifconfig" | ||
235 | elif test -x "/usr/sbin/ifconfig" | ||
236 | then | ||
237 | VAR_IFCONFIG_BINARY="/usr/sbin/ifconfig" | ||
238 | fi | ||
239 | fi | ||
240 | if test x"$VAR_IFCONFIG_BINARY" != x"false" | ||
241 | then | ||
242 | AC_DEFINE_UNQUOTED([IFCONFIG], "$VAR_IFCONFIG_BINARY", [Path to ifconfig]) | ||
243 | else | ||
244 | AC_MSG_WARN([warning: 'ifconfig' not found.]) | ||
245 | fi | ||
246 | |||
247 | |||
248 | # miniupnpc / upnpc binary is a soft runtime requirement | ||
249 | AC_PATH_TARGET_TOOL(VAR_UPNPC_BINARY, upnpc, false) | ||
250 | |||
251 | if test x"$VAR_UPNPC_BINARY" != x"false" | ||
252 | then | ||
253 | AC_DEFINE_UNQUOTED([UPNPC], "$VAR_UPNPC_BINARY", [Path to upnpc binary]) | ||
254 | else | ||
255 | AC_MSG_WARN([warning: 'upnpc' binary not found.]) | ||
256 | fi | ||
208 | 257 | ||
209 | AC_CHECK_MEMBER(struct tm.tm_gmtoff, | 258 | AC_CHECK_MEMBER(struct tm.tm_gmtoff, |
210 | [AC_DEFINE(HAVE_TM_GMTOFF, 1, | 259 | [AC_DEFINE(HAVE_TM_GMTOFF, 1, |
@@ -219,6 +268,10 @@ AC_CHECK_DECLS([_stati64]) | |||
219 | # will be more selective! | 268 | # will be more selective! |
220 | SAVE_LIBS=$LIBS | 269 | SAVE_LIBS=$LIBS |
221 | 270 | ||
271 | have_addrinfo_a=0 | ||
272 | AC_CHECK_LIB(anl, getaddrinfo_a, [have_addrinfo_a=1 AC_DEFINE(HAVE_GETADDRINFO_A,1,[getaddrinfo_a supported])]) | ||
273 | AM_CONDITIONAL(HAVE_GETADDRINFO_A, [test "$have_addrinfo_a" = 1]) | ||
274 | |||
222 | # tests only run on Windows | 275 | # tests only run on Windows |
223 | if test "x$build_target" = "xmingw" | 276 | if test "x$build_target" = "xmingw" |
224 | then | 277 | then |
@@ -398,7 +451,32 @@ fi | |||
398 | 451 | ||
399 | # check for jansson library | 452 | # check for jansson library |
400 | jansson=0 | 453 | jansson=0 |
401 | AC_CHECK_HEADER([jansson.h],jansson=1) | 454 | AC_MSG_CHECKING(for libjansson) |
455 | AC_ARG_WITH(jansson, | ||
456 | [ --with-jansson=PFX base of libjansson installation], | ||
457 | [AC_MSG_RESULT([$with_jansson]) | ||
458 | case $with_jansson in | ||
459 | no) | ||
460 | ;; | ||
461 | yes) | ||
462 | AC_CHECK_HEADERS(jansson.h, | ||
463 | AC_CHECK_LIB([jansson], [json_loads], | ||
464 | jansson=1)) | ||
465 | ;; | ||
466 | *) | ||
467 | LDFLAGS="-L$with_jansson/lib $LDFLAGS" | ||
468 | CPPFLAGS="-I$with_jansson/include $CPPFLAGS" | ||
469 | AC_CHECK_HEADERS(jansson.h, | ||
470 | AC_CHECK_LIB([jansson], [json_loads], | ||
471 | EXT_LIB_PATH="-L$with_jansson/lib $EXT_LIB_PATH" | ||
472 | jansson=1)) | ||
473 | ;; | ||
474 | esac | ||
475 | ], | ||
476 | [AC_MSG_RESULT([--with-jansson not specified]) | ||
477 | AC_CHECK_HEADERS(jansson.h, | ||
478 | AC_CHECK_LIB([jansson], [json_loads], | ||
479 | jansson=1))]) | ||
402 | AM_CONDITIONAL(HAVE_JANSSON, [test "$jansson" = 1]) | 480 | AM_CONDITIONAL(HAVE_JANSSON, [test "$jansson" = 1]) |
403 | if test "x$jansson" = x1 | 481 | if test "x$jansson" = x1 |
404 | then | 482 | then |
@@ -407,6 +485,7 @@ else | |||
407 | AC_DEFINE([HAVE_JANSSON],[0],[Lacking jansson library]) | 485 | AC_DEFINE([HAVE_JANSSON],[0],[Lacking jansson library]) |
408 | fi | 486 | fi |
409 | 487 | ||
488 | |||
410 | # check for libpulse(audio) library | 489 | # check for libpulse(audio) library |
411 | pulse=0 | 490 | pulse=0 |
412 | AC_CHECK_LIB(pulse,pa_stream_peek, | 491 | AC_CHECK_LIB(pulse,pa_stream_peek, |
@@ -608,7 +687,7 @@ AC_CHECK_LIB([kstat],[kstat_open]) | |||
608 | # should the build process be building the documentation? | 687 | # should the build process be building the documentation? |
609 | AC_MSG_CHECKING(whether to build documentation) | 688 | AC_MSG_CHECKING(whether to build documentation) |
610 | AC_ARG_ENABLE([documentation], | 689 | AC_ARG_ENABLE([documentation], |
611 | [AS_HELP_STRING([--enable-documentation], [build the documentation])], | 690 | [AS_HELP_STRING([--disable-documentation], [do not build the documentation])], |
612 | [documentation=${enableval}], | 691 | [documentation=${enableval}], |
613 | [documentation=yes]) | 692 | [documentation=yes]) |
614 | AC_MSG_RESULT($documentation) | 693 | AC_MSG_RESULT($documentation) |
@@ -890,7 +969,7 @@ postgres=false | |||
890 | # even running the check for postgres breaks emscripten ... | 969 | # even running the check for postgres breaks emscripten ... |
891 | if test "$taler_only" != yes; then | 970 | if test "$taler_only" != yes; then |
892 | AX_LIB_POSTGRESQL([9.5]) | 971 | AX_LIB_POSTGRESQL([9.5]) |
893 | if test "$found_postgresql" = "yes"; then | 972 | if test "x$found_postgresql" = "xyes"; then |
894 | CPPFLAGS="$CPPFLAGS $POSTGRESQL_CPPFLAGS" | 973 | CPPFLAGS="$CPPFLAGS $POSTGRESQL_CPPFLAGS" |
895 | AC_CHECK_HEADERS([libpq-fe.h], | 974 | AC_CHECK_HEADERS([libpq-fe.h], |
896 | postgres=true) | 975 | postgres=true) |
@@ -1389,24 +1468,25 @@ AM_CONDITIONAL([ENABLE_MALICIOUS], [test 1=$malicious]) | |||
1389 | AC_DEFINE_UNQUOTED([ENABLE_MALICIOUS], [$malicious], | 1468 | AC_DEFINE_UNQUOTED([ENABLE_MALICIOUS], [$malicious], |
1390 | [enable compilation of malicious code]) | 1469 | [enable compilation of malicious code]) |
1391 | 1470 | ||
1392 | # should services be started by default when a peer starts? Some services may | 1471 | # should services be started on demand when needed? Some services may choose to |
1393 | # choose to never start by default and it is upto the service/module developer to | 1472 | # never start by default and it is up to the service/module developer to decide |
1394 | # decide it by having "AUTOSTART = NO" instead of "AUTOSTART = @AUTOSTART@" in | 1473 | # by having "START_ON_DEMAND = NO" instead of "START_ON_DEMAND = @START_ON_DEMAND@" |
1395 | # the service/module's conf.in file. | 1474 | # in the service/module's conf.in file. |
1396 | AUTOSTART="YES" | 1475 | # See also IMMEDIATE_START for an unconditional immediate start. |
1397 | AC_MSG_CHECKING(whether to auto-start peer's services by default) | 1476 | START_ON_DEMAND="YES" |
1477 | AC_MSG_CHECKING(whether to start peer's services on demand by default) | ||
1398 | AC_ARG_ENABLE([autostart], | 1478 | AC_ARG_ENABLE([autostart], |
1399 | [AS_HELP_STRING([--disable-autostart], [do not start peer's services by default])], | 1479 | [AS_HELP_STRING([--disable-autostart], [do not start peer's services by default])], |
1400 | [enable_autostart=${enableval} | 1480 | [enable_autostart=${enableval} |
1401 | if test "x$enable_autostart" == "xno" | 1481 | if test "x$enable_autostart" == "xno" |
1402 | then | 1482 | then |
1403 | AUTOSTART="NO" | 1483 | START_ON_DEMAND="NO" |
1404 | fi | 1484 | fi |
1405 | ], | 1485 | ], |
1406 | [enable_autostart=yes]) | 1486 | [enable_autostart=yes]) |
1407 | AC_MSG_RESULT($enable_autostart) | 1487 | AC_MSG_RESULT($enable_autostart) |
1408 | #AM_CONDITIONAL([HAVE_AUTOSTART], [test "x$enable_autostart" = "xyes"]) | 1488 | #AM_CONDITIONAL([HAVE_START_ON_DEMAND], [test "x$enable_autostart" = "xyes"]) |
1409 | AC_SUBST(AUTOSTART) | 1489 | AC_SUBST(START_ON_DEMAND) |
1410 | 1490 | ||
1411 | # should memory statistics be kept (very expensive CPU-wise!) | 1491 | # should memory statistics be kept (very expensive CPU-wise!) |
1412 | AC_MSG_CHECKING(whether to create expensive statistics on memory use) | 1492 | AC_MSG_CHECKING(whether to create expensive statistics on memory use) |
@@ -1509,7 +1589,7 @@ AC_LINK_IFELSE( | |||
1509 | ],[ | 1589 | ],[ |
1510 | AC_DEFINE_UNQUOTED([HAVE_GETADDRINFO],1,[Define this if getaddrinfo() is available]) | 1590 | AC_DEFINE_UNQUOTED([HAVE_GETADDRINFO],1,[Define this if getaddrinfo() is available]) |
1511 | ],[ | 1591 | ],[ |
1512 | AC_DEFINE_UNQUOTED([HAVE_GETADDRINFO],1,[Define this if getaddrinfo() is available]) | 1592 | AC_DEFINE_UNQUOTED([HAVE_GETADDRINFO],0,[Define this if getaddrinfo() is available]) |
1513 | ]) | 1593 | ]) |
1514 | 1594 | ||
1515 | else | 1595 | else |
@@ -1540,6 +1620,8 @@ AM_CONDITIONAL([USE_COVERAGE], [test "x$use_gcov" = "xyes"]) | |||
1540 | 1620 | ||
1541 | 1621 | ||
1542 | # version info | 1622 | # version info |
1623 | # TODO: git blame says this predates our switch to git. git-svn should be adjusted to simply git, or | ||
1624 | # an external script that does the job. | ||
1543 | AC_PATH_PROG(svnversioncommand, svnversion) | 1625 | AC_PATH_PROG(svnversioncommand, svnversion) |
1544 | AC_PATH_PROG(gitcommand, git) | 1626 | AC_PATH_PROG(gitcommand, git) |
1545 | AC_MSG_CHECKING(for source being under a VCS) | 1627 | AC_MSG_CHECKING(for source being under a VCS) |
@@ -1679,7 +1761,6 @@ src/testing/Makefile | |||
1679 | src/topology/Makefile | 1761 | src/topology/Makefile |
1680 | src/transport/Makefile | 1762 | src/transport/Makefile |
1681 | src/transport/transport.conf | 1763 | src/transport/transport.conf |
1682 | src/tun/Makefile | ||
1683 | src/util/Makefile | 1764 | src/util/Makefile |
1684 | src/util/resolver.conf | 1765 | src/util/resolver.conf |
1685 | src/vpn/Makefile | 1766 | src/vpn/Makefile |
@@ -1687,10 +1768,11 @@ src/vpn/vpn.conf | |||
1687 | src/zonemaster/Makefile | 1768 | src/zonemaster/Makefile |
1688 | src/zonemaster/zonemaster.conf | 1769 | src/zonemaster/zonemaster.conf |
1689 | src/rest/Makefile | 1770 | src/rest/Makefile |
1771 | src/rest-plugins/Makefile | ||
1690 | src/abe/Makefile | 1772 | src/abe/Makefile |
1773 | src/reclaim-attribute/Makefile | ||
1774 | src/reclaim/Makefile | ||
1691 | src/zklaim/Makefile | 1775 | src/zklaim/Makefile |
1692 | src/identity-attribute/Makefile | ||
1693 | src/identity-provider/Makefile | ||
1694 | pkgconfig/Makefile | 1776 | pkgconfig/Makefile |
1695 | pkgconfig/gnunetarm.pc | 1777 | pkgconfig/gnunetarm.pc |
1696 | pkgconfig/gnunetats.pc | 1778 | pkgconfig/gnunetats.pc |
@@ -1703,8 +1785,6 @@ pkgconfig/gnunetdatacache.pc | |||
1703 | pkgconfig/gnunetdatastore.pc | 1785 | pkgconfig/gnunetdatastore.pc |
1704 | pkgconfig/gnunetdht.pc | 1786 | pkgconfig/gnunetdht.pc |
1705 | pkgconfig/gnunetdns.pc | 1787 | pkgconfig/gnunetdns.pc |
1706 | pkgconfig/gnunetdnsparser.pc | ||
1707 | pkgconfig/gnunetdnsstub.pc | ||
1708 | pkgconfig/gnunetdv.pc | 1788 | pkgconfig/gnunetdv.pc |
1709 | pkgconfig/gnunetenv.pc | 1789 | pkgconfig/gnunetenv.pc |
1710 | pkgconfig/gnunetfragmentation.pc | 1790 | pkgconfig/gnunetfragmentation.pc |
@@ -1733,7 +1813,6 @@ pkgconfig/gnunetstatistics.pc | |||
1733 | pkgconfig/gnunettestbed.pc | 1813 | pkgconfig/gnunettestbed.pc |
1734 | pkgconfig/gnunettesting.pc | 1814 | pkgconfig/gnunettesting.pc |
1735 | pkgconfig/gnunettransport.pc | 1815 | pkgconfig/gnunettransport.pc |
1736 | pkgconfig/gnunettun.pc | ||
1737 | pkgconfig/gnunetutil.pc | 1816 | pkgconfig/gnunetutil.pc |
1738 | pkgconfig/gnunetvpn.pc | 1817 | pkgconfig/gnunetvpn.pc |
1739 | ]) | 1818 | ]) |
@@ -1778,6 +1857,28 @@ then | |||
1778 | AC_MSG_NOTICE([WARNING: jansson library not found. json support will not be compiled.]) | 1857 | AC_MSG_NOTICE([WARNING: jansson library not found. json support will not be compiled.]) |
1779 | fi | 1858 | fi |
1780 | 1859 | ||
1860 | # | ||
1861 | # FIXME: `some modules' -> be more specific which exact modules. | ||
1862 | # | ||
1863 | |||
1864 | # warn user if iptables is not found | ||
1865 | if test "$VAR_IPTABLES_BINARY" = "false" | ||
1866 | then | ||
1867 | AC_MSG_NOTICE([WARNING: iptables not found. some modules may not have full functionality.]) | ||
1868 | fi | ||
1869 | |||
1870 | # warn user if ifconfig is not found | ||
1871 | if test "$VAR_IFCONFIG_BINARY" = "false" | ||
1872 | then | ||
1873 | AC_MSG_NOTICE([WARNING: ifconfig not found. some modules may not have full functionality.]) | ||
1874 | fi | ||
1875 | |||
1876 | # warn user if upnpc binary is not found | ||
1877 | if test "$VAR_UPNPC_BINARY" = "false" | ||
1878 | then | ||
1879 | AC_MSG_NOTICE([WARNING: upnpc binary not found. some modules may not have full functionality.]) | ||
1880 | fi | ||
1881 | |||
1781 | #gnutls | 1882 | #gnutls |
1782 | if test x$gnutls != xtrue | 1883 | if test x$gnutls != xtrue |
1783 | then | 1884 | then |