aboutsummaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorng0 <ng0@n0.is>2019-05-25 15:25:17 +0000
committerng0 <ng0@n0.is>2019-05-25 15:25:17 +0000
commit4e586659d146fd7d571d22cf066445a7679016f4 (patch)
treec04579af7bec57abdfe884e4ce415e6c73a4b9c1 /configure.ac
parent8a408cc2604b6706e7f55391e4006b2b6d070430 (diff)
downloadgnunet-4e586659d146fd7d571d22cf066445a7679016f4.tar.gz
gnunet-4e586659d146fd7d571d22cf066445a7679016f4.zip
configure: bits of reindenting, start of an incomplete new configuration
end output.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac528
1 files changed, 335 insertions, 193 deletions
diff --git a/configure.ac b/configure.ac
index b83e5267b..753c77924 100644
--- a/configure.ac
+++ b/configure.ac
@@ -321,14 +321,24 @@ AC_CHECK_DECLS([_stati64])
321SAVE_LIBS=$LIBS 321SAVE_LIBS=$LIBS
322 322
323have_addrinfo_a=0 323have_addrinfo_a=0
324AC_CHECK_LIB(anl, getaddrinfo_a, [have_addrinfo_a=1 AC_DEFINE(HAVE_GETADDRINFO_A,1,[getaddrinfo_a supported])]) 324AC_CHECK_LIB(anl,
325AM_CONDITIONAL(HAVE_GETADDRINFO_A, [test "$have_addrinfo_a" = 1]) 325 getaddrinfo_a,
326 326 [have_addrinfo_a=1 AC_DEFINE(HAVE_GETADDRINFO_A,
327 1,
328 [getaddrinfo_a supported])])
329AM_CONDITIONAL(HAVE_GETADDRINFO_A,
330 [test "$have_addrinfo_a" = 1])
327 331
328# tests only run on Windows 332# tests only run on Windows
329AS_IF([test "x$build_target" = "xmingw"], 333AS_IF([test "x$build_target" = "xmingw"],
330 [AC_CHECK_LIB(plibc, plibc_init, [], [AC_MSG_ERROR([GNUnet requires PlibC on Windows])]) 334 [AC_CHECK_LIB(plibc,
331 AC_CHECK_LIB(gnurx, regexec, [], [AC_MSG_ERROR([GNUnet requires libgnurx on Windows])])]) 335 plibc_init,
336 [],
337 [AC_MSG_ERROR([GNUnet requires PlibC on Windows])])
338 AC_CHECK_LIB(gnurx,
339 regexec,
340 [],
341 [AC_MSG_ERROR([GNUnet requires libgnurx on Windows])])])
332 342
333# libgcrypt 343# libgcrypt
334gcrypt=0 344gcrypt=0
@@ -359,41 +369,54 @@ AC_CHECK_DECLS([struct in6_ifreq], [], [], [[#include <linux/if_tun.h>]])
359# should the build process be building the documentation? 369# should the build process be building the documentation?
360AC_MSG_CHECKING(whether to build documentation) 370AC_MSG_CHECKING(whether to build documentation)
361AC_ARG_ENABLE([documentation], 371AC_ARG_ENABLE([documentation],
362 [AS_HELP_STRING([--disable-documentation], [do not build the documentation])], 372 [AS_HELP_STRING([--disable-documentation],
363 [documentation=${enableval}], 373 [do not build the documentation])],
364 [documentation=yes]) 374 [documentation=${enableval}],
375 [documentation=yes])
365AC_MSG_RESULT($documentation) 376AC_MSG_RESULT($documentation)
366AS_IF([test "x$documentation" = "xyes"], 377AS_IF([test "x$documentation" = "xyes"],
367[ 378 [AM_CONDITIONAL([DOCUMENTATION],
368 AM_CONDITIONAL([DOCUMENTATION],true) 379 true)
369 AC_DEFINE([DOCUMENTATION],[1],[Building the documentation]) 380 AC_DEFINE([DOCUMENTATION],
370],[ 381 [1],
371 AM_CONDITIONAL([DOCUMENTATION],false) 382 [Building the documentation])],
372 AC_DEFINE([DOCUMENTATION],[0],[Not building the documentation]) 383 [AM_CONDITIONAL([DOCUMENTATION],
373]) 384 false)
374 385 AC_DEFINE([DOCUMENTATION],
375# FIXME: Something is wrong about this in the output of ./configure runs 386 [0],
387 [Not building the documentation])])
388
389# COMMENT: Check wether to transpile texinfo to mdoc.
390# COMMENT: This is TRUE when --enable-texi2mdoc-generation
391# COMMENT: but ERRORS when texi2mdoc binary is missing in your $PATH
392# COMMENT: and makes the configure fail if it is missing.
393# COMMENT: Consequential the DEFINE and CONDITIONAL are set to true.
394# COMMENT: This is FALSE when --disable-texi2mdoc-generation was set
395# COMMENT: or nothing was set (this is the default).
396# COMMENT: There are 2 nested AS_IFs because we need to catch the
397# COMMENT: potential non-existence of the texi2mdoc binary.
398# COMMENT: Default return value / setting: no
376AC_MSG_CHECKING(wether to include generated texi2mdoc output in installation) 399AC_MSG_CHECKING(wether to include generated texi2mdoc output in installation)
377AC_ARG_ENABLE([texi2mdoc-generation], 400AC_ARG_ENABLE([texi2mdoc-generation],
378 [AS_HELP_STRING([--enable-texi2mdoc-generation], [include generated texi2mdoc output in installation])], 401 [AS_HELP_STRING([--enable-texi2mdoc-generation],
379 [texi2mdoc_generation=${enableval}], 402 [include generated texi2mdoc output in installation])],
380 [texi2mdoc_generation=no]) 403 [texi2mdoc_generation=${enableval}],
404 [texi2mdoc_generation=no])
381AC_MSG_RESULT($texi2mdoc_generation) 405AC_MSG_RESULT($texi2mdoc_generation)
382AS_IF([test "x$texi2mdoc_generation" = "xyes"], 406AS_IF([test "x$texi2mdoc_generation" = "xyes"],
383 [ 407 [AS_IF([test "$texi2mdoc" = 0],
384 AS_IF([test "$texi2mdoc" = 0], 408 [AC_MSG_WARN([ERROR: transpiled mdoc output requires texi2mdoc.])
385 [ 409 AC_MSG_WARN([ERROR: texi2mdoc can be obtained via your Operating System])
386 AC_MSG_WARN([ERROR: mdoc output currently requires texi2mdoc.]) 410 AC_MSG_WARN([ERROR: package manager or from https://mandoc.bsd.lv/texi2mdoc/])],
387 AC_MSG_WARN([ERROR: texi2mdoc can be obtained via your Operating System]) 411 [AM_CONDITIONAL([TEXI2MDOC_GENERATION],true)
388 AC_MSG_WARN([ERROR: package manager or from https://mandoc.bsd.lv/texi2mdoc/]) 412 AC_DEFINE([TEXI2MDOC_GENERATION],
389 ],[ 413 [1],
390 AM_CONDITIONAL([TEXI2MDOC_GENERATION],true) 414 [Building section 7 mdoc output])])],
391 AC_DEFINE([TEXI2MDOC_GENERATION],[1],[Building section 7 mdoc output]) 415 [AM_CONDITIONAL([TEXI2MDOC_GENERATION],
392 ]) 416 false)
393 ],[ 417 AC_DEFINE([TEXI2MDOC_GENERATION],
394 AM_CONDITIONAL([TEXI2MDOC_GENERATION],false) 418 [0],
395 AC_DEFINE([TEXI2MDOC_GENERATION],[0],[Not building section 7 mdoc output]) 419 [Not building section 7 mdoc output])])
396 ])
397 420
398# should the build process be building only the documentation? 421# should the build process be building only the documentation?
399AC_MSG_CHECKING(whether to build only documentation) 422AC_MSG_CHECKING(whether to build only documentation)
@@ -408,6 +431,8 @@ AS_IF([test "x$documentation_only" = "xyes"],
408 AC_DEFINE([DOCUMENTATION_ONLY],[1],[Building only the documentation]) 431 AC_DEFINE([DOCUMENTATION_ONLY],[1],[Building only the documentation])
409 ],[ 432 ],[
410 AM_CONDITIONAL([DOCUMENTATION_ONLY],false) 433 AM_CONDITIONAL([DOCUMENTATION_ONLY],false)
434 # TODO: Double negation might be a bit hard to parse for some
435 # TODO: people reading the output.
411 AC_DEFINE([DOCUMENTATION_ONLY],[0],[Not building only the documentation]) 436 AC_DEFINE([DOCUMENTATION_ONLY],[0],[Not building only the documentation])
412 ]) 437 ])
413 438
@@ -931,21 +956,22 @@ AS_IF([test x$my_with_libidn2 = x1],
931 LIBS="-lidn2 $LIBS" 956 LIBS="-lidn2 $LIBS"
932 AC_DEFINE_UNQUOTED([HAVE_LIBIDN2], 957 AC_DEFINE_UNQUOTED([HAVE_LIBIDN2],
933 [1], 958 [1],
934 [Define to 1 if you have 'libidn2' (-lidn2).])], 959 [Define to 1 if you have 'libidn2' (-lidn2).])],
935 [MISSING_DEPS="${MISSING_DEPS}${MISSING_SEP}libidn2" 960 [MISSING_DEPS="${MISSING_DEPS}${MISSING_SEP}libidn2"
936 MISSING_SEP=", "])]) 961 MISSING_SEP=", "])])
937AM_CONDITIONAL(HAVE_LIBIDN2, test x$working_libidn2 = x1) 962AM_CONDITIONAL(HAVE_LIBIDN2,
963 test x$working_libidn2 = x1)
938AS_IF([test x$working_libidn2 = x0], 964AS_IF([test x$working_libidn2 = x0],
939 [AS_IF([test x$my_with_libidn = x1], 965 [AS_IF([test x$my_with_libidn = x1],
940 [AC_MSG_NOTICE([Checking for libidn]) 966 [AC_MSG_NOTICE([Checking for libidn])
941 AC_CHECK_LIB([idn], 967 AC_CHECK_LIB([idn],
942 [idna_to_ascii_8z], 968 [idna_to_ascii_8z],
943 [working_libidn1=1 969 [working_libidn1=1
944 LIBS="-lidn $LIBS" 970 LIBS="-lidn $LIBS"
945 AC_DEFINE_UNQUOTED([HAVE_LIBIDN], 971 AC_DEFINE_UNQUOTED([HAVE_LIBIDN],
946 [1], 972 [1],
947 [Define to 1 if you have 'libidn' (-lidn).])], 973 [Define to 1 if you have 'libidn' (-lidn).])],
948 [there_can_only_be_one=0])], 974 [there_can_only_be_one=0])],
949 [AS_IF([test x$my_with_libidn2 = x1], 975 [AS_IF([test x$my_with_libidn2 = x1],
950 [there_can_only_be_one=0 976 [there_can_only_be_one=0
951 AC_MSG_FAILURE([* There can only be one libidn. 977 AC_MSG_FAILURE([* There can only be one libidn.
@@ -971,18 +997,17 @@ AC_ARG_WITH(zlib,
971 [AS_IF([test "$withval" = "no"], 997 [AS_IF([test "$withval" = "no"],
972 [AC_MSG_ERROR([GNUnet requires zlib])], 998 [AC_MSG_ERROR([GNUnet requires zlib])],
973 [test "$withval" != "yes"], 999 [test "$withval" != "yes"],
974 [ 1000 [Z_DIR=$withval
975 Z_DIR=$withval 1001 CPPFLAGS="${CPPFLAGS} -I$withval/include"
976 CPPFLAGS="${CPPFLAGS} -I$withval/include" 1002 LDFLAGS="${LDFLAGS} -L$withval/lib"])])
977 LDFLAGS="${LDFLAGS} -L$withval/lib"
978 ])
979 ])
980AC_CHECK_HEADER(zlib.h, 1003AC_CHECK_HEADER(zlib.h,
981 [], 1004 [],
982 [AC_MSG_ERROR([GNUnet requires zlib])]) 1005 [AC_MSG_ERROR([GNUnet requires zlib])])
983AC_CHECK_LIB(z, compress2, 1006AC_CHECK_LIB(z,
984 [ 1007 compress2,
985 AC_DEFINE([HAVE_ZLIB], [], [Have compression library]) 1008 [AC_DEFINE([HAVE_ZLIB],
1009 [],
1010 [Have compression library])
986 if test "x${Z_DIR}" != "x"; then 1011 if test "x${Z_DIR}" != "x"; then
987 Z_CFLAGS="-I${Z_DIR}/include" 1012 Z_CFLAGS="-I${Z_DIR}/include"
988 Z_LIBS="-L${Z_DIR}/lib -lz" 1013 Z_LIBS="-L${Z_DIR}/lib -lz"
@@ -994,9 +1019,7 @@ AC_SUBST(Z_CFLAGS)
994AC_SUBST(Z_LIBS) 1019AC_SUBST(Z_LIBS)
995 1020
996AS_IF([test "$enable_shared" = "no"], 1021AS_IF([test "$enable_shared" = "no"],
997[ 1022 [AC_MSG_ERROR([GNUnet only works with shared libraries. Sorry.])])
998 AC_MSG_ERROR([GNUnet only works with shared libraries. Sorry.])
999])
1000 1023
1001 1024
1002# restore LIBS 1025# restore LIBS
@@ -1013,15 +1036,17 @@ AM_ICONV
1013# test for libunistring 1036# test for libunistring
1014gl_LIBUNISTRING 1037gl_LIBUNISTRING
1015AS_IF([test $HAVE_LIBUNISTRING != yes], 1038AS_IF([test $HAVE_LIBUNISTRING != yes],
1016 [AC_MSG_ERROR([GNUnet requires libunistring])]) 1039 [AC_MSG_ERROR([GNUnet requires libunistring])])
1017 1040
1018# under emscripten, $gl_libunistring_hexversion is undefined 1041# under emscripten, $gl_libunistring_hexversion is undefined
1019if test "$taler_only" != yes; then 1042if test "$taler_only" != yes; then
1020 1043
1021AS_IF([test "x$gl_libunistring_hexversion" = "x" || test "$gl_libunistring_hexversion" -le 2305], 1044AS_IF([test "x$gl_libunistring_hexversion" = "x" || test "$gl_libunistring_hexversion" -le 2305],
1022 [AC_MSG_ERROR([GNUnet requires libunistring >= 0.9.1.1])]) 1045 [AC_MSG_ERROR([GNUnet requires libunistring >= 0.9.1.1])])
1023fi 1046fi
1024AC_CHECK_HEADERS([unistr.h],,AC_MSG_ERROR([Compiling GNUnet requires unistr.h (from libunistring) to be installed])) 1047AC_CHECK_HEADERS([unistr.h],
1048 ,
1049 AC_MSG_ERROR([Compiling GNUnet requires unistr.h (from libunistring) to be installed]))
1025 1050
1026# restore LIBS 1051# restore LIBS
1027LIBS=$SAVE_LIBS 1052LIBS=$SAVE_LIBS
@@ -1037,10 +1062,11 @@ AC_CHECK_HEADERS([fcntl.h math.h errno.h ctype.h limits.h stdio.h stdlib.h strin
1037 1062
1038 1063
1039 1064
1040# Checks for headers that are only required on some systems or opional (and where we do NOT abort if they are not there) 1065# Checks for headers that are only required on some systems or
1066# opional (and where we do NOT abort if they are not there)
1041AC_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 terminos.h argz.h ucred.h sys/ucred.h endian.h sys/endian.h execinfo.h byteswap.h]) 1067AC_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 terminos.h argz.h ucred.h sys/ucred.h endian.h sys/endian.h execinfo.h byteswap.h])
1042 1068
1043# FreeBSD requires something more funky for netinet/in_systm.h and netinet/ip.h... 1069# FreeBSD requires this for netinet/in_systm.h and netinet/ip.h
1044AC_CHECK_HEADERS([sys/types.h netinet/in_systm.h netinet/in.h netinet/ip.h],,, 1070AC_CHECK_HEADERS([sys/types.h netinet/in_systm.h netinet/in.h netinet/ip.h],,,
1045[#ifdef HAVE_SYS_TYPES_H 1071[#ifdef HAVE_SYS_TYPES_H
1046#include <sys/types.h> 1072#include <sys/types.h>
@@ -1293,14 +1319,15 @@ AC_CHECK_MEMBER([struct sockaddr_in.sin_len],
1293 ]) 1319 ])
1294 1320
1295AC_CHECK_MEMBER([struct sockaddr_un.sun_len], 1321AC_CHECK_MEMBER([struct sockaddr_un.sun_len],
1296 [ AC_DEFINE(HAVE_SOCKADDR_UN_SUN_LEN, 1, [Do we have sockaddr_un.sun_len?]) 1322 [ AC_DEFINE(HAVE_SOCKADDR_UN_SUN_LEN,
1297 ], 1323 1,
1298 [], 1324 [Do we have sockaddr_un.sun_len?])],
1299 [ 1325 [],
1300 #include <sys/types.h> 1326 [
1301 #include <sys/socket.h> 1327 #include <sys/types.h>
1302 #include <sys/un.h> 1328 #include <sys/socket.h>
1303 ]) 1329 #include <sys/un.h>
1330 ])
1304 1331
1305 1332
1306 1333
@@ -1326,15 +1353,19 @@ LIBS=$SAVE_LIBS
1326 1353
1327GN_INTLINCL="" 1354GN_INTLINCL=""
1328GN_LIBINTL="$LTLIBINTL" 1355GN_LIBINTL="$LTLIBINTL"
1329AC_ARG_ENABLE(framework, [ --enable-framework enable Mac OS X framework build helpers],enable_framework_build=$enableval) 1356AC_ARG_ENABLE(framework,
1330AM_CONDITIONAL(WANT_FRAMEWORK, test x$enable_framework_build = xyes) 1357 [--enable-framework enable Mac OS X framework build helpers],
1358 enable_framework_build=$enableval)
1359AM_CONDITIONAL(WANT_FRAMEWORK,
1360 test x$enable_framework_build = xyes)
1331AS_IF([test x$enable_framework_build = xyes], 1361AS_IF([test x$enable_framework_build = xyes],
1332[ 1362 [AC_DEFINE([FRAMEWORK_BUILD],
1333 AC_DEFINE([FRAMEWORK_BUILD], 1, [Build a Mac OS X Framework]) 1363 1,
1334 GN_INTLINCL='-I$(top_srcdir)/src/intlemu' 1364 [Build a Mac OS X Framework])
1335 GN_LIBINTL='$(top_builddir)/src/intlemu/libintlemu.la -framework CoreFoundation' 1365 GN_INTLINCL='-I$(top_srcdir)/src/intlemu'
1336 AC_LIB_APPENDTOVAR([CPPFLAGS], [$GN_INTLINCL]) 1366 GN_LIBINTL='$(top_builddir)/src/intlemu/libintlemu.la -framework CoreFoundation'
1337]) 1367 AC_LIB_APPENDTOVAR([CPPFLAGS],
1368 [$GN_INTLINCL])])
1338 1369
1339GN_LIB_LDFLAGS="-export-dynamic -no-undefined" 1370GN_LIB_LDFLAGS="-export-dynamic -no-undefined"
1340GN_PLUGIN_LDFLAGS="-export-dynamic -avoid-version -module -no-undefined" 1371GN_PLUGIN_LDFLAGS="-export-dynamic -avoid-version -module -no-undefined"
@@ -1361,30 +1392,29 @@ AC_SUBST(DATAROOTDIR)
1361# TODO: do we need to change anything for "doas" on openbsd? 1392# TODO: do we need to change anything for "doas" on openbsd?
1362AC_MSG_CHECKING(for sudo) 1393AC_MSG_CHECKING(for sudo)
1363AC_ARG_WITH(sudo, 1394AC_ARG_WITH(sudo,
1364 [ --with-sudo=PATH path to sudo binary (or just yes)], 1395 [ --with-sudo=PATH path to sudo binary (or just yes)],
1365 [AC_MSG_RESULT("$with_sudo") 1396 [AC_MSG_RESULT("$with_sudo")
1366 AS_CASE([$with_sudo], 1397 AS_CASE([$with_sudo],
1367 [no],[SUDO_BINARY=], 1398 [no],[SUDO_BINARY=],
1368 [yes],[SUDO_BINARY=sudo], 1399 [yes],[SUDO_BINARY=sudo],
1369 [SUDO_BINARY=$with_sudo]) 1400 [SUDO_BINARY=$with_sudo])],
1370 ], 1401 [AC_MSG_RESULT([no])])
1371 [AC_MSG_RESULT([no])])
1372AC_SUBST(SUDO_BINARY) 1402AC_SUBST(SUDO_BINARY)
1373AM_CONDITIONAL([HAVE_SUDO], [test "x$SUDO_BINARY" != "x" -o -w /]) 1403AM_CONDITIONAL([HAVE_SUDO],
1404 [test "x$SUDO_BINARY" != "x" -o -w /])
1374 1405
1375 1406
1376# test for gnunetdns group name 1407# test for gnunetdns group name
1377GNUNETDNS_GROUP=gnunetdns 1408GNUNETDNS_GROUP=gnunetdns
1378AC_MSG_CHECKING(for gnunetdns group name) 1409AC_MSG_CHECKING(for gnunetdns group name)
1379AC_ARG_WITH(gnunetdns, 1410AC_ARG_WITH(gnunetdns,
1380 [ --with-gnunetdns=GRPNAME name for gnunetdns group], 1411 [ --with-gnunetdns=GRPNAME name for gnunetdns group],
1381 [AC_MSG_RESULT("$with_gnunetdns") 1412 [AC_MSG_RESULT("$with_gnunetdns")
1382 AS_CASE([$with_gnunetdns], 1413 AS_CASE([$with_gnunetdns],
1383 [no],[GNUNETDNS_GROUP=gnunet], 1414 [no],[GNUNETDNS_GROUP=gnunet],
1384 [yes],[GNUNETDNS_GROUP=gnunetdns], 1415 [yes],[GNUNETDNS_GROUP=gnunetdns],
1385 [GNUNETDNS_GROUP=$with_gnunetdns]) 1416 [GNUNETDNS_GROUP=$with_gnunetdns])],
1386 ], 1417 [AC_MSG_RESULT([gnunetdns])])
1387 [AC_MSG_RESULT([gnunetdns])])
1388AC_SUBST(GNUNETDNS_GROUP) 1418AC_SUBST(GNUNETDNS_GROUP)
1389 1419
1390 1420
@@ -1394,19 +1424,21 @@ gnutls=0
1394gnutls_dane=0 1424gnutls_dane=0
1395AC_MSG_CHECKING(for gnutls) 1425AC_MSG_CHECKING(for gnutls)
1396AC_ARG_WITH(gnutls, 1426AC_ARG_WITH(gnutls,
1397 [ --with-gnutls=PFX base of gnutls installation], 1427 [ --with-gnutls=PFX base of gnutls installation],
1398 [AC_MSG_RESULT([$with_gnutls]) 1428 [AC_MSG_RESULT([$with_gnutls])
1399 AS_CASE([$with_gnutls], 1429 AS_CASE([$with_gnutls],
1400 [no],[], 1430 [no],[],
1401 [yes],[ 1431 [yes],
1402 AC_CHECK_HEADERS([gnutls/abstract.h], 1432 [AC_CHECK_HEADERS([gnutls/abstract.h],
1403 AC_CHECK_LIB([gnutls], [gnutls_priority_set], 1433 AC_CHECK_LIB([gnutls],
1404 gnutls=true)) 1434 [gnutls_priority_set],
1405 AC_CHECK_HEADERS([gnutls/dane.h], 1435 gnutls=true))
1406 AC_CHECK_LIB([gnutls-dane], [dane_verify_crt_raw], 1436 AC_CHECK_HEADERS([gnutls/dane.h],
1407 gnutls_dane=1)) 1437 AC_CHECK_LIB([gnutls-dane],
1408 ],[ 1438 [dane_verify_crt_raw],
1409 LDFLAGS="-L$with_gnutls/lib $LDFLAGS" 1439 gnutls_dane=1))],
1440
1441 [LDFLAGS="-L$with_gnutls/lib $LDFLAGS"
1410 CPPFLAGS="-I$with_gnutls/include $CPPFLAGS" 1442 CPPFLAGS="-I$with_gnutls/include $CPPFLAGS"
1411 AC_CHECK_HEADERS([gnutls/abstract.h], 1443 AC_CHECK_HEADERS([gnutls/abstract.h],
1412 AC_CHECK_LIB([gnutls], [gnutls_priority_set], 1444 AC_CHECK_LIB([gnutls], [gnutls_priority_set],
@@ -1547,9 +1579,11 @@ AM_CONDITIONAL([ENABLE_MALICIOUS], [test 1=$malicious])
1547AC_DEFINE_UNQUOTED([ENABLE_MALICIOUS], [$malicious], 1579AC_DEFINE_UNQUOTED([ENABLE_MALICIOUS], [$malicious],
1548 [enable compilation of malicious code]) 1580 [enable compilation of malicious code])
1549 1581
1550# should services be started on demand when needed? Some services may choose to 1582# should services be started on demand when needed?
1551# never start by default and it is up to the service/module developer to decide 1583# Some services may choose to never start by default
1552# by having "START_ON_DEMAND = NO" instead of "START_ON_DEMAND = @START_ON_DEMAND@" 1584# and it is up to the service/module developer to decide
1585# by having "START_ON_DEMAND = NO" instead of
1586# "START_ON_DEMAND = @START_ON_DEMAND@"
1553# in the service/module's conf.in file. 1587# in the service/module's conf.in file.
1554# See also IMMEDIATE_START for an unconditional immediate start. 1588# See also IMMEDIATE_START for an unconditional immediate start.
1555START_ON_DEMAND="YES" 1589START_ON_DEMAND="YES"
@@ -1683,10 +1717,11 @@ fi
1683AC_DEFINE_UNQUOTED([ENABLE_WINDOWS_WORKAROUNDS], $workarounds, [enable workarounds used on Windows (only useful for test cases)]) 1717AC_DEFINE_UNQUOTED([ENABLE_WINDOWS_WORKAROUNDS], $workarounds, [enable workarounds used on Windows (only useful for test cases)])
1684 1718
1685 1719
1686# Check if the __thread storage class for thread-local storage is available. 1720# Check if the __thread storage class for
1721# thread-local storage is available.
1687AC_MSG_CHECKING(whether __thread is supported) 1722AC_MSG_CHECKING(whether __thread is supported)
1688AC_LINK_IFELSE( 1723AC_LINK_IFELSE(
1689 [AC_LANG_PROGRAM([#include <stdlib.h> 1724[AC_LANG_PROGRAM([#include <stdlib.h>
1690 #undef __thread 1725 #undef __thread
1691 static __thread int a = 1;], 1726 static __thread int a = 1;],
1692 [exit(a-1);])], 1727 [exit(a-1);])],
@@ -1708,7 +1743,8 @@ AM_CONDITIONAL([USE_COVERAGE], [test "x$use_gcov" = "xyes"])
1708 1743
1709 1744
1710# version info 1745# version info
1711# TODO: git blame says this predates our switch to git. git-svn should be adjusted to simply git, or 1746# TODO: git blame says this predates our switch to git.
1747# git-svn should be adjusted to simply git, or
1712# an external script that does the job. 1748# an external script that does the job.
1713AC_PATH_PROG(svnversioncommand, svnversion) 1749AC_PATH_PROG(svnversioncommand, svnversion)
1714AC_PATH_PROG(gitcommand, git) 1750AC_PATH_PROG(gitcommand, git)
@@ -1891,105 +1927,209 @@ pkgconfig/gnunetvpn.pc
1891]) 1927])
1892AC_OUTPUT 1928AC_OUTPUT
1893 1929
1894# Finally: summary!
1895
1896# warn user if mysql found but not used due to version
1897AS_IF([test "$mysqlfail" = "true"]
1898 [AC_MSG_NOTICE([WARNING: optional MySQL not found (or too old)])])
1899
1900# sqlite
1901AS_IF([test "x$sqlite" = "x0"],
1902 [AC_MSG_ERROR([ERROR: sqlite3 not found, but sqlite3 is required.])])
1903
1904# libgnurl
1905AS_IF([test "$gnurl" = "0"],
1906 [AS_IF([test "x$curl" = "xfalse"],
1907 [AC_MSG_NOTICE([WARNING: libgnurl not found. http client support will not be compiled.])
1908 AC_MSG_WARN([ERROR: libgnurl not found. hostlist daemon will not be compiled, and you probably WANT the hostlist daemon])],
1909 [AC_MSG_NOTICE([WARNING: libgnurl not found, trying to use libcurl-gnutls instead.])])])
1910
1911# bluetooth
1912AS_IF([test "x$bluetooth" = "x0"],
1913 [AC_MSG_NOTICE([WARNING: optional bluetooth library not found.])])
1914
1915
1916# jansson
1917AS_IF([test "x$jansson" = "x0"],
1918 [AC_MSG_NOTICE([WARNING: optional jansson library not found.])])
1919 1930
1920#
1921# FIXME: `some modules' -> be more specific which exact modules. 1931# FIXME: `some modules' -> be more specific which exact modules.
1922#
1923
1924# warn user if iptables is not found
1925AS_IF([test "$VAR_IPTABLES_BINARY" = "false"],
1926 [AC_MSG_NOTICE([WARNING: optional iptables not found])])
1927
1928# warn user if ifconfig is not found
1929AS_IF([test "$VAR_IFCONFIG_BINARY" = "false"],
1930 [AC_MSG_NOTICE([WARNING: optional ifconfig not found])])
1931
1932# warn user if upnpc binary is not found
1933AS_IF([test "$VAR_UPNPC_BINARY" = "false"],
1934 [AC_MSG_NOTICE([WARNING: optional upnpc binary not found])])
1935
1936#gnutls
1937AS_IF([test x$gnutls != xtrue],
1938 [AC_MSG_NOTICE([WARNING: GnuTLS not found, gnunet-gns-proxy will not be built])],
1939 [AS_IF([test "x$gnutls_dane" != "x1"],
1940 [AC_MSG_NOTICE([WARNING: GnuTLS has no DANE support, DANE validation will not be possible])])])
1941
1942# warn user if libzbar is not found
1943AS_IF([test "$have_zbar" = 0],
1944 [AC_MSG_NOTICE([WARNING: zbar not found, gnunet-qr will not be built.])])
1945 1932
1946# java ports 1933# java ports
1947AS_IF([test "x$enable_java_ports" = "xyes"], 1934AS_IF([test "x$enable_java_ports" = "xyes"],
1948 [AC_MSG_NOTICE([NOTICE: Opening ports for gnunet-java bindings by default.])]) 1935 [AC_MSG_NOTICE([NOTICE: Opening ports for gnunet-java bindings by default.])])
1949 1936
1950# MHD 1937####
1951AS_IF([test "x$lmhd" != "x1"], 1938#### Lasciate ogne speranza, voi ch'intrate
1952 [AC_MSG_NOTICE([WARNING: optional libmicrohttpd not found])]) 1939####
1953 1940#### This could be moved to the checks above,
1954# conversation 1941#### but for now let's keep it here.
1955AS_IF([test "x$conversation_backend" = "xnone"], 1942####
1956 [AS_IF([test "x$pulse" != "x1"], 1943
1957 [AC_MSG_NOTICE([WARNING: libpulse(audio) not found, conversation will not be built.])]) 1944# -- print message regarding enabled experimental features
1958 AS_IF([test "x$opus" != "x1"], 1945AS_IF([test "x$enable_experimental" = "xyes"],
1959 [AC_MSG_NOTICE([WARNING: libopus not found, conversation will not be built.])]) 1946 [experimental_msg="experimental features enabled"])
1960 AS_IF([test "x$gst" != "x1"], 1947# -- OSX Framework
1961 [AC_MSG_NOTICE([WARNING: GStreamer not found, conversation will not be built.])])]) 1948AS_IF([test "$enable_framework_build" = "yes"],
1962 1949 [macosx_framework_msg="yes"],
1963AS_IF([test "$extractor" != 1], 1950 [macosx_framework_msg="no"])
1964 [AC_MSG_WARN([ERROR: libextractor not found, but various file-sharing functions require it])]) 1951# -- libidn 2
1965
1966AS_IF([test "x$working_libidn2" = x1], 1952AS_IF([test "x$working_libidn2" = x1],
1967 [AC_MSG_NOTICE([INFO: Using libidn2])]) 1953 [libidn2_msg="libidn2"])
1954# -- libidn 1
1968AS_IF([test "x$working_libidn1" = x1], 1955AS_IF([test "x$working_libidn1" = x1],
1969 [AC_MSG_NOTICE([INFO: Using libidn1])]) 1956 [libidn1_msg="libidn1"])
1970 1957# -- texi2mdoc
1971AC_MSG_NOTICE([NOTICE: Database support is set to MySQL: $mysql, SQLite: $sqlite, Postgres: $postgres]) 1958AS_IF([test "x$texi2mdoc_generation" = x1],
1972 1959 [mdoc_msg="yes"],
1973AS_IF([test "$enable_framework_build" = "yes"], 1960 [mdoc_msg="no"])
1974 [AC_MSG_NOTICE([Mac OS X framework build enabled.])]) 1961# -- texinfo
1962AS_IF([test "x$makeinfo" != "x1"],
1963 [texinfo_msg="no"],
1964 [texinfo_msg="yes"])
1965# -- conversation
1966AS_IF([test "x$conversation_backend" = "xnone"],
1967 [AS_IF([test "x$pulse" != "x1"],
1968 [AC_MSG_NOTICE([WARNING: libpulse(audio) not found, conversation will not be built.])
1969 libpulse_msg="no"],
1970 [libpulse_msg="yes"])
1971 AS_IF([test "x$opus" != "x1"],
1972 [AC_MSG_NOTICE([WARNING: libopus not found, conversation will not be built.])
1973 libopus_msg="no"],
1974 [libopus_msg="yes"])
1975 AS_IF([test "x$gst" != "x1"],
1976 [AC_MSG_NOTICE([WARNING: GStreamer not found, conversation will not be built.])
1977 gstreamer_msg="no"],
1978 [gstreamer_msg="yes"])],
1979 [features_msg="$features_msg conversation"])
1980# -- interface
1981interface_msg=`echo $DEFAULT_INTERFACE | tr -d \"`
1982# -- libmicrohttpd
1983AS_IF([test "x$lmhd" != "x1"],
1984 [libmicrohttpd_msg="no (optional)"],
1985 [libmicrohttpd_msg="yes"])
1986# -- jansson
1987AS_IF([test "x$jansson" = "x0"],
1988 [jansson_msg="no (optional)"],
1989 [jansson_msg="yes"])
1990# -- libextractor
1991AS_IF([test "$extractor" != 1],
1992 [AC_MSG_WARN([ERROR: libextractor not found, but various file-sharing functions require it])],
1993 [libextractor_msg="yes"])
1994# -- libzbar
1995AS_IF([test "$have_zbar" = 1],
1996 [libzbar_msg="yes"
1997 features_msg="$features_msg gnunet-qr"],
1998 [AC_MSG_NOTICE([WARNING: zbar not found, gnunet-qr will not be built.])
1999 libzbar_msg="no"])
2000# -- libgnurl
2001AS_IF([test "$gnurl" = "0"],
2002 [AS_IF([test "x$curl" = "xfalse"],
2003 [AC_MSG_NOTICE([WARNING: libgnurl not found. http client support will not be compiled.])
2004 AC_MSG_WARN([ERROR: libgnurl not found. hostlist daemon will not be compiled, and you probably WANT the hostlist daemon])
2005 curl_msg="no"],
2006 [AC_MSG_NOTICE([WARNING: libgnurl not found, trying to use libcurl-gnutls instead.])
2007 curl_msg="yes"])],
2008 [gnurl_msg="yes"])
2009# -- ifconfig
2010AS_IF([test "$VAR_IFCONFIG_BINARY" = "false"],
2011 [AC_MSG_NOTICE([WARNING: optional ifconfig not found])
2012 ifconfig_msg="no (optional)"],
2013 [ifconfig_msg="yes"])
2014# -- upnpc
2015AS_IF([test "$VAR_UPNPC_BINARY" = "false"],
2016 [AC_MSG_NOTICE([WARNING: optional upnpc binary not found])
2017 upnpc_msg="no (optional)"],
2018 [upnpc_msg="yes"])
2019# -- iptables
2020AS_IF([test "$VAR_IPTABLES_BINARY" = "false"],
2021 [AC_MSG_NOTICE([WARNING: optional iptables not found])
2022 iptables_msg="no (optional)"],
2023 [iptables_msg="yes"])
2024# -- bluetooth
2025AS_IF([test "x$bluetooth" = "x0"],
2026 [AC_MSG_NOTICE([WARNING: optional bluetooth library not found.])
2027 bluetooth_msg="no (optional)"],
2028 [bluetooth_msg="yes"])
2029# -- gnutls
2030AS_IF([test x$gnutls != xtrue],
2031 [AC_MSG_NOTICE([WARNING: GnuTLS not found, gnunet-gns-proxy will not be built])
2032 gnutls_msg="no"],
2033 [AS_IF([test "x$gnutls_dane" != "x1"],
2034 [AC_MSG_NOTICE([WARNING: GnuTLS has no DANE support, DANE validation will not be possible])
2035 gnutls_msg="yes (without DANE support)"],
2036 [gnutls_msg="yes (with DANE support)"])])
2037# -- databases
2038AS_IF([test $mysqlfail = true]
2039 [AC_MSG_NOTICE([WARNING: optional MySQL not found (or too old)])])
2040AS_IF([test "$mysql" = true],
2041 [features_msg="$features_msg mysql"
2042 mysql_msg="yes"],
2043 [mysql_msg="no"])
2044AS_IF([test "$sqlite" = true],
2045 [features_msg="$features_msg sqlite"
2046 sqlite_msg="yes"],
2047 [AC_MSG_ERROR([ERROR: sqlite3 not found, but sqlite3 is required.])
2048 sqlite_msg="no"])
2049AS_IF([test "$postgres" = true],
2050 [features_msg="$features_msg postgres"
2051 postgres_msg="yes"],
2052 [postgres_msg="no"])
2053# -- features
2054# ---- 1. replace spaces with newlines,
2055# ---- 2. sort the lines,
2056# ---- 3. replace the newlines with spaces.
2057features_msg=`echo $features_msg | tr ' ' '\012' | sort | tr '\012' ' '`
2058AC_SUBST(features_msg)
2059
2060
2061# The summary
2062# TODO: reduce the length of the last message block ("the message")
2063
2064AC_MSG_NOTICE([
2065GNUnet Configuration (incomplete!)
2066
2067gnunet version: ${VERSION}
2068
2069Host setup: ${host}
2070Install prefix: ${prefix}
2071Compiler: ${CC}
2072CFLAGS: ${CFLAGS}
2073CPPFLAGS: ${CPPFLAGS}
2074LDFLAGS: ${LDFLAGS}
2075LIBS: ${LIBS}
2076Build Target: $build_target
2077Mac OSX framework build: ${macosx_framework_msg}
2078
2079Default Interface: ${interface_msg}
2080
2081MySQL: ${mysql_msg}
2082PostgreSQL: ${postgres_msg}
2083sqlite3: ${sqlite_msg}
2084gnurl: ${gnurl_msg}
2085curl: ${curl_msg}
2086bluetooth: ${bluetooth_msg}
2087jansson: ${jansson_msg}
2088iptables: ${iptables_msg}
2089ifconfig: ${ifconfig_msg}
2090upnpc: ${upnpc_msg}
2091gnutls: ${gnutls_msg}
2092libzbar: ${libzbar_msg}
2093java: ${java_msg}
2094libmicrohttpd: ${libmicrohttpd_msg}
2095libidn: ${libidn1_msg}${libidn2_msg}
2096libopus: ${libopus_msg}
2097gstreamer: ${gstreamer_msg}
2098libpulse: ${libpulse_msg}
2099libextractor: ${libextractor_msg}
2100
2101texinfo manual: ${texinfo_msg}
2102transpiled mdoc manual: ${mdoc_msg}
2103
2104features: ${features_msg}
2105experimental: ${experimental_msg}
2106
2107
2108IMPORTANT:
1975 2109
1976AC_MSG_NOTICE([********************************************
1977Please make sure NOW that you have created a user and group 'gnunet' 2110Please make sure NOW that you have created a user and group 'gnunet'
1978and additionally a group 'gnunetdns'. On Debian and Ubuntu GNU/Linux, type: 2111and additionally a group 'gnunetdns'. On Debian and Ubuntu GNU/Linux,
1979 addgroup gnunetdns 2112type:
1980 adduser --system --group --disabled-login --home /var/lib/gnunet gnunet 2113
2114 addgroup gnunetdns
2115 adduser --system --group --disabled-login --home /var/lib/gnunet gnunet
1981 2116
1982Make sure that '/var/lib/gnunet' is owned (and writable) by user 2117Make sure that '/var/lib/gnunet' is owned (and writable) by user
1983'gnunet'. Then, you can compile GNUnet with 2118'gnunet'. Then, you can compile GNUnet with
1984 make 2119
2120 make
1985 2121
1986After that, run (if necessary as 'root') 2122After that, run (if necessary as 'root')
1987 make install 2123
2124 make install
2125
1988to install everything. 2126to install everything.
1989 2127
1990Each GNUnet user should be added to the 'gnunet' group (may 2128Each GNUnet user should be added to the 'gnunet' group (may
1991require fresh login to come into effect): 2129require fresh login to come into effect):
1992 adduser USERNAME gnunet 2130
2131 adduser USERNAME gnunet
2132
1993(run the above command as root once for each of your users, replacing 2133(run the above command as root once for each of your users, replacing
1994"USERNAME" with the respective login names). If you have a global IP 2134"USERNAME" with the respective login names). If you have a global IP
1995address, no further configuration is required. 2135address, no further configuration is required.
@@ -2007,7 +2147,9 @@ you have to copy ~/.gnunet/gnunet.conf" over to the "gnunet" user's
2007home directory in the end. 2147home directory in the end.
2008 2148
2009Once you have configured your peer, run (as the 'gnunet' user) 2149Once you have configured your peer, run (as the 'gnunet' user)
2010 gnunet-arm -s 2150
2151 gnunet-arm -s
2152
2011to start the peer. You can then run the various GNUnet-tools as 2153to start the peer. You can then run the various GNUnet-tools as
2012your "normal" user (who should only be in the group 'gnunet'). 2154your "normal" user (who should only be in the group 'gnunet').
2013********************************************]) 2155])