aboutsummaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac273
1 files changed, 166 insertions, 107 deletions
diff --git a/configure.ac b/configure.ac
index 804a7dd56..e37df28dd 100644
--- a/configure.ac
+++ b/configure.ac
@@ -21,11 +21,11 @@
21AC_PREREQ(2.61) 21AC_PREREQ(2.61)
22# Checks for programs. 22# Checks for programs.
23AC_INIT([gnunet], [0.11.0pre66], [bug-gnunet@gnu.org]) 23AC_INIT([gnunet], [0.11.0pre66], [bug-gnunet@gnu.org])
24AC_CONFIG_AUX_DIR([build-aux])
24 25
25AC_CANONICAL_TARGET 26AC_CANONICAL_TARGET
26AC_CANONICAL_HOST 27AC_CANONICAL_HOST
27AC_CANONICAL_SYSTEM 28AC_CANONICAL_SYSTEM
28
29AM_INIT_AUTOMAKE 29AM_INIT_AUTOMAKE
30m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) 30m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
31AC_CONFIG_HEADERS([gnunet_config.h]) 31AC_CONFIG_HEADERS([gnunet_config.h])
@@ -244,7 +244,6 @@ else
244AC_MSG_WARN([warning: 'ifconfig' not found.]) 244AC_MSG_WARN([warning: 'ifconfig' not found.])
245fi 245fi
246 246
247
248# miniupnpc / upnpc binary is a soft runtime requirement 247# miniupnpc / upnpc binary is a soft runtime requirement
249AC_PATH_TARGET_TOOL(VAR_UPNPC_BINARY, upnpc, false) 248AC_PATH_TARGET_TOOL(VAR_UPNPC_BINARY, upnpc, false)
250 249
@@ -301,10 +300,32 @@ then
301fi 300fi
302AC_DEFINE_UNQUOTED([NEED_LIBGCRYPT_VERSION], "$NEED_LIBGCRYPT_VERSION", [required libgcrypt version]) 301AC_DEFINE_UNQUOTED([NEED_LIBGCRYPT_VERSION], "$NEED_LIBGCRYPT_VERSION", [required libgcrypt version])
303 302
304# TODO: add check for VERSION 303# Check for makeinfo version >= 5, required for building documentation.
304# TODO: invalid version should imply --disable-documentation (and
305# maybe --with-section7).
305# TODO: add check for alternatives 306# TODO: add check for alternatives
306# TODO: add switch to skip documentation building 307# TODO: add switch to skip documentation building
307AM_MISSING_PROG([MAKEINFO], [makeinfo]) 308have_makeinfo_5=false
309AC_PROG_SED
310AC_CHECK_PROG([MAKEINFO_FOUND], [makeinfo], [yes])
311if test x"${MAKEINFO_FOUND}" = xyes
312then
313 MAKEINFO_VERSION_REQ=5
314 AC_MSG_CHECKING([for makeinfo version >= $MAKEINFO_VERSION_REQ])
315 # XXX: is this sed invocation portable?
316 MAKEINFO_VERSION=`makeinfo --version | sed -ne 's/^\(makeinfo\|texi2any\) .* \([[0-9]][[0-9]]*\)\.[[0-9]][[0-9]]*.*$/\2/p'`
317 if test x$MAKEINFO_VERSION = x -o 0$MAKEINFO_VERSION -lt $MAKEINFO_VERSION_REQ
318 then
319 AC_MSG_RESULT([no])
320 AC_MSG_FAILURE([Program 'makeinfo' version >= $MAKEINFO_VERSION_REQ is required.])
321 else
322 AC_MSG_RESULT([yes])
323 have_makeinfo_5=true
324 fi
325else
326 AC_MSG_FAILURE([Missing program 'makeinfo', Documentation will not be built. Please install it if you want 'info' documentation or refer to online resources at 'https://docs.gnunet.org'.])
327fi
328AM_CONDITIONAL([HAVE_MAKEINFO_5], [test x$have_makeinfo_5 = xtrue])
308 329
309# Adam shostack suggests the following for Windows: 330# Adam shostack suggests the following for Windows:
310# -D_FORTIFY_SOURCE=2 -fstack-protector-all 331# -D_FORTIFY_SOURCE=2 -fstack-protector-all
@@ -699,8 +720,15 @@ AC_ARG_ENABLE([section7],
699AC_MSG_RESULT($section7) 720AC_MSG_RESULT($section7)
700if test "x$section7" = "xyes" 721if test "x$section7" = "xyes"
701then 722then
723 if test "$texi2mdoc" = 0
724 then
725 AC_MSG_WARN([ERROR: mdoc output currently requires texi2mdoc.])
726 AC_MSG_WARN([ERROR: texi2mdoc can be obtained via your Operating System])
727 AC_MSG_WARN([ERROR: package manager or from https://mandoc.bsd.lv/texi2mdoc/])
728 else
702 AM_CONDITIONAL([SECTION7],true) 729 AM_CONDITIONAL([SECTION7],true)
703 AC_DEFINE([SECTION7],[1],[Building section 7 mdoc output]) 730 AC_DEFINE([SECTION7],[1],[Building section 7 mdoc output])
731 fi
704else 732else
705 AM_CONDITIONAL([SECTION7],false) 733 AM_CONDITIONAL([SECTION7],false)
706 AC_DEFINE([SECTION7],[0],[Not building section 7 mdoc output]) 734 AC_DEFINE([SECTION7],[0],[Not building section 7 mdoc output])
@@ -820,28 +848,93 @@ fi
820# restore LIBS 848# restore LIBS
821LIBS=$SAVE_LIBS 849LIBS=$SAVE_LIBS
822 850
823 851# libidn and libidn2. The ideal goal is this:
824# libidn 852# check for libidn2, if it doesn't exist check for libidn
825AC_MSG_CHECKING([if Libidn can be used]) 853# if both exist, prefer libidn2
826AC_ARG_WITH(libidn, AC_HELP_STRING([--with-libidn=[DIR]], 854# if none exist, fail and message that libidn or libidn2
827 [Support IDN (needs GNU Libidn)]), 855# is required with a preference for libidn2.
828libidn=$withval, libidn=yes) 856# TODO: What we have right here can probably be improved.
829if test "$libidn" != "no"; then 857my_with_libidn=1
830 if test "$libidn" != "yes"; then 858AC_ARG_WITH(libidn,
831 LDFLAGS="${LDFLAGS} -L$libidn/lib" 859 AS_HELP_STRING([--with-libidn=pathname],
832 CPPFLAGS="${CPPFLAGS} -I$libidn/include" 860 [Support IDN (needs libidn)]),
833 fi 861 [],
834fi 862 [withval="yes"])
835libidn=no 863AS_IF([test x_$withval = x_yes],
836AC_CHECK_HEADER(idna.h, 864 [AC_CHECK_HEADERS([idna.h],
837 AC_CHECK_LIB(idn, stringprep_check_version, 865 AC_MSG_NOTICE([Found idna.h]),
838 [libidn=yes LIBS="${LIBS} -lidn"], []), []) 866 AC_CHECK_HEADERS([idn/idna.h],
839if test "$libidn" != "yes"; then 867 AC_MSG_NOTICE([Found idn/idna.h]),
840 AC_MSG_FAILURE([GNUnet requires libidn. 868 my_with_libidn=0))],
841libidn-1.13 should be sufficient, newer versions work too.]) 869 [AS_IF([test x_$withval != x_no],
842fi 870 [CFLAGS="$CFLAGS -I$withval/include"
843AC_MSG_RESULT($libidn) 871 LDFLAGS="$LDFLAGS -L$withval/lib"
844 872 AC_CHECK_HEADERS([idna.h],
873 AC_MSG_NOTICE([Found idna.h]),
874 [AC_MSG_NOTICE([Failed to find idna.h])
875 my_with_libidn=0])],
876 [my_with_libidn=0])])
877
878my_with_libidn2=1
879AC_ARG_WITH(libidn2,
880 AS_HELP_STRING([--with-libidn2=pathname],
881 [Support IDN (needs libidn2)]),
882 [],
883 [withval="yes"])
884AS_IF([test x_$withval = x_yes],
885 [AC_CHECK_HEADERS([idn2.h],
886 AC_MSG_NOTICE([Found idn2.h]),
887 AC_CHECK_HEADERS([idn2/idn2.h],
888 AC_MSG_NOTICE([Found idn2/idn2.h]),
889 [AC_MSG_NOTICE([Failed to find idn2.h])
890 my_with_libidn2=0]))],
891 [AS_IF([test x_$withval != x_no],
892 [CFLAGS="$CFLAGS -I$withval/include"
893 LDFLAGS="$LDFLAGS -L$withval/lib"],
894 [my_with_libidn2=0])])
895
896AC_MSG_CHECKING([if libidn can be used])
897# Check for LIBIDNs
898there_can_only_be_one=1
899
900working_libidn1=0
901working_libidn2=0
902AS_IF([test x$my_with_libidn2 = x1],
903 [AC_MSG_NOTICE([Checking for libidn2])
904 AC_CHECK_LIB([idn2],
905 [idn2_to_unicode_8z8z],
906 [working_libidn2=1
907 LIBS="-lidn2 $LIBS"
908 AC_DEFINE_UNQUOTED([HAVE_LIBIDN2],
909 [1],
910 [Define to 1 if you have 'libidn2' (-lidn).])],
911 [MISSING_DEPS="${MISSING_DEPS}${MISSING_SEP}libidn2"
912 MISSING_SEP=", "])])
913AM_CONDITIONAL(HAVE_LIBIDN2, test x$working_libidn2 = x1)
914AS_IF([test x$working_libidn2 = x0],
915 [AS_IF([test x$my_with_libidn = x1],
916 [AC_MSG_NOTICE([Checking for libidn])
917 AC_CHECK_LIB([idn],
918 [idna_to_ascii_8z],
919 [working_libidn1=1
920 LIBS="-lidn $LIBS"
921 AC_DEFINE_UNQUOTED([HAVE_LIBIDN],
922 [1],
923 [Define to 1 if you have 'libidn' (-lidn).])],
924 [there_can_only_be_one=0])],
925 [AS_IF([test x$my_with_libidn2 = x1],
926 [there_can_only_be_one=0
927 AC_MSG_FAILURE([* There can only be one libidn.
928 * Provide either libidn >= 1.13
929 * or
930 * libidn2 to the configure
931 * script via
932 * --with-libidn2
933 * --with-libidn])])])])
934AM_CONDITIONAL(HAVE_LIBIDN, test x$working_libidn1 = x1)
935
936AS_IF([test x$there_can_only_be_one = x0],
937 [AC_MSG_FAILURE([Missing dependencies: $MISSING_DEPS])])
845 938
846# test for zlib 939# test for zlib
847SAVE_LDFLAGS=$LDFLAGS 940SAVE_LDFLAGS=$LDFLAGS
@@ -1680,7 +1773,8 @@ contrib/Makefile
1680doc/Makefile 1773doc/Makefile
1681doc/man/Makefile 1774doc/man/Makefile
1682doc/doxygen/Makefile 1775doc/doxygen/Makefile
1683doc/documentation/Makefile 1776doc/handbook/Makefile
1777doc/tutorial/Makefile
1684m4/Makefile 1778m4/Makefile
1685po/Makefile.in 1779po/Makefile.in
1686src/Makefile 1780src/Makefile
@@ -1836,115 +1930,80 @@ AC_OUTPUT
1836# Finally: summary! 1930# Finally: summary!
1837 1931
1838# warn user if mysql found but not used due to version 1932# warn user if mysql found but not used due to version
1839if test "$mysqlfail" = "true" 1933AS_IF([test "$mysqlfail" = "true"]
1840then 1934 [AC_MSG_NOTICE([WARNING: optional MySQL not found (or too old)])])
1841 AC_MSG_NOTICE([WARNING: MySQL found, but too old. MySQL support will not be compiled.])
1842fi
1843 1935
1844# sqlite 1936# sqlite
1845if test "x$sqlite" = "x0" 1937AS_IF([test "x$sqlite" = "x0"],
1846then 1938 [AC_MSG_ERROR([ERROR: sqlite3 not found, but sqlite3 is required.])])
1847 AC_MSG_ERROR([ERROR: sqlite3 not found, but sqlite3 is required.])
1848fi
1849 1939
1850# libgnurl 1940# libgnurl
1851if test "$gnurl" = "0" 1941AS_IF([test "$gnurl" = "0"],
1852then 1942 [AS_IF([test "x$curl" = "xfalse"],
1853 if test "x$curl" = "xfalse" 1943 [AC_MSG_NOTICE([WARNING: libgnurl not found. http client support will not be compiled.])
1854 then 1944 AC_MSG_WARN([ERROR: libgnurl not found. hostlist daemon will not be compiled, and you probably WANT the hostlist daemon])],
1855 AC_MSG_NOTICE([WARNING: libgnurl not found. http client support will not be compiled.]) 1945 [AC_MSG_NOTICE([WARNING: libgnurl not found, trying to use libcurl-gnutls instead.])])])
1856 AC_MSG_WARN([ERROR: libgnurl not found. hostlist daemon will not be compiled, and you probably WANT the hostlist daemon])
1857 else
1858 AC_MSG_NOTICE([WARNING: libgnurl not found, trying to use libcurl-gnutls instead.])
1859 fi
1860fi
1861
1862 1946
1863# bluetooth 1947# bluetooth
1864if test "x$bluetooth" = "x0" 1948AS_IF([test "x$bluetooth" = "x0"],
1865then 1949 [AC_MSG_NOTICE([WARNING: optional bluetooth library not found.])])
1866 AC_MSG_NOTICE([WARNING: bluetooth library not found. bluetooth support will not be compiled.]) 1950
1867fi
1868 1951
1869# jansson 1952# jansson
1870if test "x$jansson" = "x0" 1953AS_IF([test "x$jansson" = "x0"],
1871then 1954 [AC_MSG_NOTICE([WARNING: optional jansson library not found.])])
1872 AC_MSG_NOTICE([WARNING: jansson library not found. json support will not be compiled.])
1873fi
1874 1955
1875# 1956#
1876# FIXME: `some modules' -> be more specific which exact modules. 1957# FIXME: `some modules' -> be more specific which exact modules.
1877# 1958#
1878 1959
1879# warn user if iptables is not found 1960# warn user if iptables is not found
1880if test "$VAR_IPTABLES_BINARY" = "false" 1961AS_IF([test "$VAR_IPTABLES_BINARY" = "false"],
1881then 1962 [AC_MSG_NOTICE([WARNING: optional iptables not found])])
1882AC_MSG_NOTICE([WARNING: iptables not found. some modules may not have full functionality.])
1883fi
1884 1963
1885# warn user if ifconfig is not found 1964# warn user if ifconfig is not found
1886if test "$VAR_IFCONFIG_BINARY" = "false" 1965AS_IF([test "$VAR_IFCONFIG_BINARY" = "false"],
1887then 1966 [AC_MSG_NOTICE([WARNING: optional ifconfig not found])])
1888AC_MSG_NOTICE([WARNING: ifconfig not found. some modules may not have full functionality.])
1889fi
1890 1967
1891# warn user if upnpc binary is not found 1968# warn user if upnpc binary is not found
1892if test "$VAR_UPNPC_BINARY" = "false" 1969AS_IF([test "$VAR_UPNPC_BINARY" = "false"],
1893then 1970 [AC_MSG_NOTICE([WARNING: optional upnpc binary not found])])
1894AC_MSG_NOTICE([WARNING: upnpc binary not found. some modules may not have full functionality.])
1895fi
1896 1971
1897#gnutls 1972#gnutls
1898if test x$gnutls != xtrue 1973AS_IF([test x$gnutls != xtrue],
1899then 1974 [AC_MSG_NOTICE([WARNING: GnuTLS not found, gnunet-gns-proxy will not be built])],
1900 AC_MSG_NOTICE([WARNING: GnuTLS not found, gnunet-gns-proxy will not be built]) 1975 [AS_IF([test "x$gnutls_dane" != "x1"],
1901else 1976 [AC_MSG_NOTICE([WARNING: GnuTLS has no DANE support, DANE validation will not be possible])])])
1902if test "x$gnutls_dane" != "x1"
1903then
1904 AC_MSG_NOTICE([WARNING: GnuTLS has no DANE support, DANE validation will not be possible])
1905fi
1906fi
1907 1977
1908# java ports 1978# java ports
1909if test "x$enable_java_ports" = "xyes" 1979AS_IF([test "x$enable_java_ports" = "xyes"],
1910then 1980 [AC_MSG_NOTICE([NOTICE: Opening ports for gnunet-java bindings by default.])])
1911 AC_MSG_NOTICE([NOTICE: Opening ports for gnunet-java bindings by default.])
1912fi
1913 1981
1914# MHD 1982# MHD
1915if test "x$lmhd" != "x1" 1983AS_IF([test "x$lmhd" != "x1"],
1916then 1984 [AC_MSG_NOTICE([WARNING: optional libmicrohttpd not found])])
1917 AC_MSG_NOTICE([WARNING: libmicrohttpd not found, http transport will not be installed.])
1918fi
1919 1985
1920# conversation 1986# conversation
1921if test "x$conversation_backend" = "xnone" 1987AS_IF([test "x$conversation_backend" = "xnone"],
1922then 1988 [AS_IF([test "x$pulse" != "x1"],
1923 if test "x$pulse" != "x1" 1989 [AC_MSG_NOTICE([WARNING: libpulse(audio) not found, conversation will not be built.])])
1924 then 1990 AS_IF([test "x$opus" != "x1"],
1925 AC_MSG_NOTICE([WARNING: libpulse(audio) not found, conversation will not be built.]) 1991 [AC_MSG_NOTICE([WARNING: libopus not found, conversation will not be built.])])
1926 fi 1992 AS_IF([test "x$gst" != "x1"],
1927 if test "x$opus" != "x1" 1993 [AC_MSG_NOTICE([WARNING: GStreamer not found, conversation will not be built.])])])
1928 then 1994
1929 AC_MSG_NOTICE([WARNING: libopus not found, conversation will not be built.]) 1995AS_IF([test "$extractor" != 1],
1930 fi 1996 [AC_MSG_WARN([ERROR: libextractor not found, but various file-sharing functions require it])])
1931 if test "x$gst" != "x1" 1997
1932 then 1998AS_IF([test "x$working_libidn2" = x1],
1933 AC_MSG_NOTICE([WARNING: GStreamer not found, conversation will not be built.]) 1999 [AC_MSG_NOTICE([INFO: Using libidn2])])
1934 fi 2000AS_IF([test "x$working_libidn1" = x1],
1935fi 2001 [AC_MSG_NOTICE([INFO: Using libidn1])])
1936
1937if test "$extractor" != 1
1938then
1939 AC_MSG_WARN([ERROR: libextractor not found, but various file-sharing functions require it])
1940fi
1941 2002
1942AC_MSG_NOTICE([NOTICE: Database support is set to MySQL: $mysql, SQLite: $sqlite, Postgres: $postgres]) 2003AC_MSG_NOTICE([NOTICE: Database support is set to MySQL: $mysql, SQLite: $sqlite, Postgres: $postgres])
1943 2004
1944if test "$enable_framework_build" = "yes" 2005AS_IF([test "$enable_framework_build" = "yes"],
1945then 2006 [AC_MSG_NOTICE([Mac OS X framework build enabled.])])
1946 AC_MSG_NOTICE([Mac OS X framework build enabled.])
1947fi
1948 2007
1949AC_MSG_NOTICE([******************************************** 2008AC_MSG_NOTICE([********************************************
1950Please make sure NOW that you have created a user and group 'gnunet' 2009Please make sure NOW that you have created a user and group 'gnunet'