aboutsummaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac163
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#
23AC_PREREQ(2.61) 21AC_PREREQ(2.61)
24# Checks for programs. 22# Checks for programs.
25AC_INIT([gnunet], [0.11.0], [bug-gnunet@gnu.org]) 23AC_INIT([gnunet], [0.11.0pre66], [bug-gnunet@gnu.org])
26 24
27AC_CANONICAL_TARGET 25AC_CANONICAL_TARGET
28AC_CANONICAL_HOST 26AC_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
61DEFAULT_INTERFACE="\"eth0\"" 59DEFAULT_INTERFACE="\"eth0\""
62 60
63funcstocheck="getnameinfo gethostname gethostbyname gethostbyaddr getaddrinfo" 61funcstocheck="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)
66native_srcdir=$srcdir 64native_srcdir=$srcdir
@@ -200,11 +198,62 @@ AC_CHECK_LIB(c, getloadavg, AC_DEFINE(HAVE_GETLOADAVG,1,[getloadavg supported]))
200AC_CHECK_PROG(VAR_GETOPT_BINARY, getopt, true, false) 198AC_CHECK_PROG(VAR_GETOPT_BINARY, getopt, true, false)
201AM_CONDITIONAL(HAVE_GETOPT_BINARY, $VAR_GETOPT_BINARY) 199AM_CONDITIONAL(HAVE_GETOPT_BINARY, $VAR_GETOPT_BINARY)
202 200
203AC_CHECK_PROG(VAR_SSH_BINARY,ssh,true,false) 201AC_CHECK_PROG(VAR_SSH_BINARY, ssh, true, false)
204AM_CONDITIONAL(HAVE_SSH_BINARY, $VAR_SSH_BINARY) 202AM_CONDITIONAL(HAVE_SSH_BINARY, $VAR_SSH_BINARY)
205AM_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) 203AM_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)
206rm -f /tmp/gnunet_test_cosks_ssh_garbage 204rm -f /tmp/gnunet_test_cosks_ssh_garbage
207 205
206# iptables is a soft requirement to run tests
207AC_PATH_TARGET_TOOL(VAR_IPTABLES_BINARY, iptables, false)
208
209if test x"$VAR_IPTABLES_BINARY" != x"false"
210then
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
218fi
219
220if test x"$VAR_IPTABLES_BINARY" != x"false"
221then
222AC_DEFINE_UNQUOTED([IPTABLES], "$VAR_IPTABLES_BINARY", [Path to iptables])
223else
224AC_MSG_WARN([warning: 'iptables' not found.])
225fi
226
227AC_PATH_TARGET_TOOL(VAR_IFCONFIG_BINARY, ifconfig, false)
228
229AC_CHECK_PROG(VAR_IFCONFIG_BINARY, ifconfig, true, false)
230if test x"$VAR_IFCONFIG_BINARY" != x"false"
231then
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
239fi
240if test x"$VAR_IFCONFIG_BINARY" != x"false"
241then
242AC_DEFINE_UNQUOTED([IFCONFIG], "$VAR_IFCONFIG_BINARY", [Path to ifconfig])
243else
244AC_MSG_WARN([warning: 'ifconfig' not found.])
245fi
246
247
248# miniupnpc / upnpc binary is a soft runtime requirement
249AC_PATH_TARGET_TOOL(VAR_UPNPC_BINARY, upnpc, false)
250
251if test x"$VAR_UPNPC_BINARY" != x"false"
252then
253AC_DEFINE_UNQUOTED([UPNPC], "$VAR_UPNPC_BINARY", [Path to upnpc binary])
254else
255AC_MSG_WARN([warning: 'upnpc' binary not found.])
256fi
208 257
209AC_CHECK_MEMBER(struct tm.tm_gmtoff, 258AC_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!
220SAVE_LIBS=$LIBS 269SAVE_LIBS=$LIBS
221 270
271have_addrinfo_a=0
272AC_CHECK_LIB(anl, getaddrinfo_a, [have_addrinfo_a=1 AC_DEFINE(HAVE_GETADDRINFO_A,1,[getaddrinfo_a supported])])
273AM_CONDITIONAL(HAVE_GETADDRINFO_A, [test "$have_addrinfo_a" = 1])
274
222# tests only run on Windows 275# tests only run on Windows
223if test "x$build_target" = "xmingw" 276if test "x$build_target" = "xmingw"
224then 277then
@@ -398,7 +451,32 @@ fi
398 451
399# check for jansson library 452# check for jansson library
400jansson=0 453jansson=0
401AC_CHECK_HEADER([jansson.h],jansson=1) 454AC_MSG_CHECKING(for libjansson)
455AC_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))])
402AM_CONDITIONAL(HAVE_JANSSON, [test "$jansson" = 1]) 480AM_CONDITIONAL(HAVE_JANSSON, [test "$jansson" = 1])
403if test "x$jansson" = x1 481if test "x$jansson" = x1
404then 482then
@@ -407,6 +485,7 @@ else
407 AC_DEFINE([HAVE_JANSSON],[0],[Lacking jansson library]) 485 AC_DEFINE([HAVE_JANSSON],[0],[Lacking jansson library])
408fi 486fi
409 487
488
410# check for libpulse(audio) library 489# check for libpulse(audio) library
411pulse=0 490pulse=0
412AC_CHECK_LIB(pulse,pa_stream_peek, 491AC_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?
609AC_MSG_CHECKING(whether to build documentation) 688AC_MSG_CHECKING(whether to build documentation)
610AC_ARG_ENABLE([documentation], 689AC_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])
614AC_MSG_RESULT($documentation) 693AC_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 ...
891if test "$taler_only" != yes; then 970if 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])
1389AC_DEFINE_UNQUOTED([ENABLE_MALICIOUS], [$malicious], 1468AC_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.
1396AUTOSTART="YES" 1475# See also IMMEDIATE_START for an unconditional immediate start.
1397AC_MSG_CHECKING(whether to auto-start peer's services by default) 1476START_ON_DEMAND="YES"
1477AC_MSG_CHECKING(whether to start peer's services on demand by default)
1398AC_ARG_ENABLE([autostart], 1478AC_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])
1407AC_MSG_RESULT($enable_autostart) 1487AC_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"])
1409AC_SUBST(AUTOSTART) 1489AC_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!)
1412AC_MSG_CHECKING(whether to create expensive statistics on memory use) 1492AC_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
1515else 1595else
@@ -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.
1543AC_PATH_PROG(svnversioncommand, svnversion) 1625AC_PATH_PROG(svnversioncommand, svnversion)
1544AC_PATH_PROG(gitcommand, git) 1626AC_PATH_PROG(gitcommand, git)
1545AC_MSG_CHECKING(for source being under a VCS) 1627AC_MSG_CHECKING(for source being under a VCS)
@@ -1679,7 +1761,6 @@ src/testing/Makefile
1679src/topology/Makefile 1761src/topology/Makefile
1680src/transport/Makefile 1762src/transport/Makefile
1681src/transport/transport.conf 1763src/transport/transport.conf
1682src/tun/Makefile
1683src/util/Makefile 1764src/util/Makefile
1684src/util/resolver.conf 1765src/util/resolver.conf
1685src/vpn/Makefile 1766src/vpn/Makefile
@@ -1687,10 +1768,11 @@ src/vpn/vpn.conf
1687src/zonemaster/Makefile 1768src/zonemaster/Makefile
1688src/zonemaster/zonemaster.conf 1769src/zonemaster/zonemaster.conf
1689src/rest/Makefile 1770src/rest/Makefile
1771src/rest-plugins/Makefile
1690src/abe/Makefile 1772src/abe/Makefile
1773src/reclaim-attribute/Makefile
1774src/reclaim/Makefile
1691src/zklaim/Makefile 1775src/zklaim/Makefile
1692src/identity-attribute/Makefile
1693src/identity-provider/Makefile
1694pkgconfig/Makefile 1776pkgconfig/Makefile
1695pkgconfig/gnunetarm.pc 1777pkgconfig/gnunetarm.pc
1696pkgconfig/gnunetats.pc 1778pkgconfig/gnunetats.pc
@@ -1703,8 +1785,6 @@ pkgconfig/gnunetdatacache.pc
1703pkgconfig/gnunetdatastore.pc 1785pkgconfig/gnunetdatastore.pc
1704pkgconfig/gnunetdht.pc 1786pkgconfig/gnunetdht.pc
1705pkgconfig/gnunetdns.pc 1787pkgconfig/gnunetdns.pc
1706pkgconfig/gnunetdnsparser.pc
1707pkgconfig/gnunetdnsstub.pc
1708pkgconfig/gnunetdv.pc 1788pkgconfig/gnunetdv.pc
1709pkgconfig/gnunetenv.pc 1789pkgconfig/gnunetenv.pc
1710pkgconfig/gnunetfragmentation.pc 1790pkgconfig/gnunetfragmentation.pc
@@ -1733,7 +1813,6 @@ pkgconfig/gnunetstatistics.pc
1733pkgconfig/gnunettestbed.pc 1813pkgconfig/gnunettestbed.pc
1734pkgconfig/gnunettesting.pc 1814pkgconfig/gnunettesting.pc
1735pkgconfig/gnunettransport.pc 1815pkgconfig/gnunettransport.pc
1736pkgconfig/gnunettun.pc
1737pkgconfig/gnunetutil.pc 1816pkgconfig/gnunetutil.pc
1738pkgconfig/gnunetvpn.pc 1817pkgconfig/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.])
1779fi 1858fi
1780 1859
1860#
1861# FIXME: `some modules' -> be more specific which exact modules.
1862#
1863
1864# warn user if iptables is not found
1865if test "$VAR_IPTABLES_BINARY" = "false"
1866then
1867AC_MSG_NOTICE([WARNING: iptables not found. some modules may not have full functionality.])
1868fi
1869
1870# warn user if ifconfig is not found
1871if test "$VAR_IFCONFIG_BINARY" = "false"
1872then
1873AC_MSG_NOTICE([WARNING: ifconfig not found. some modules may not have full functionality.])
1874fi
1875
1876# warn user if upnpc binary is not found
1877if test "$VAR_UPNPC_BINARY" = "false"
1878then
1879AC_MSG_NOTICE([WARNING: upnpc binary not found. some modules may not have full functionality.])
1880fi
1881
1781#gnutls 1882#gnutls
1782if test x$gnutls != xtrue 1883if test x$gnutls != xtrue
1783then 1884then