diff options
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 273 |
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 @@ | |||
21 | AC_PREREQ(2.61) | 21 | AC_PREREQ(2.61) |
22 | # Checks for programs. | 22 | # Checks for programs. |
23 | AC_INIT([gnunet], [0.11.0pre66], [bug-gnunet@gnu.org]) | 23 | AC_INIT([gnunet], [0.11.0pre66], [bug-gnunet@gnu.org]) |
24 | AC_CONFIG_AUX_DIR([build-aux]) | ||
24 | 25 | ||
25 | AC_CANONICAL_TARGET | 26 | AC_CANONICAL_TARGET |
26 | AC_CANONICAL_HOST | 27 | AC_CANONICAL_HOST |
27 | AC_CANONICAL_SYSTEM | 28 | AC_CANONICAL_SYSTEM |
28 | |||
29 | AM_INIT_AUTOMAKE | 29 | AM_INIT_AUTOMAKE |
30 | m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) | 30 | m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) |
31 | AC_CONFIG_HEADERS([gnunet_config.h]) | 31 | AC_CONFIG_HEADERS([gnunet_config.h]) |
@@ -244,7 +244,6 @@ else | |||
244 | AC_MSG_WARN([warning: 'ifconfig' not found.]) | 244 | AC_MSG_WARN([warning: 'ifconfig' not found.]) |
245 | fi | 245 | fi |
246 | 246 | ||
247 | |||
248 | # miniupnpc / upnpc binary is a soft runtime requirement | 247 | # miniupnpc / upnpc binary is a soft runtime requirement |
249 | AC_PATH_TARGET_TOOL(VAR_UPNPC_BINARY, upnpc, false) | 248 | AC_PATH_TARGET_TOOL(VAR_UPNPC_BINARY, upnpc, false) |
250 | 249 | ||
@@ -301,10 +300,32 @@ then | |||
301 | fi | 300 | fi |
302 | AC_DEFINE_UNQUOTED([NEED_LIBGCRYPT_VERSION], "$NEED_LIBGCRYPT_VERSION", [required libgcrypt version]) | 301 | AC_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 |
307 | AM_MISSING_PROG([MAKEINFO], [makeinfo]) | 308 | have_makeinfo_5=false |
309 | AC_PROG_SED | ||
310 | AC_CHECK_PROG([MAKEINFO_FOUND], [makeinfo], [yes]) | ||
311 | if test x"${MAKEINFO_FOUND}" = xyes | ||
312 | then | ||
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 | ||
325 | else | ||
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'.]) | ||
327 | fi | ||
328 | AM_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], | |||
699 | AC_MSG_RESULT($section7) | 720 | AC_MSG_RESULT($section7) |
700 | if test "x$section7" = "xyes" | 721 | if test "x$section7" = "xyes" |
701 | then | 722 | then |
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 | ||
704 | else | 732 | else |
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 |
821 | LIBS=$SAVE_LIBS | 849 | LIBS=$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 |
825 | AC_MSG_CHECKING([if Libidn can be used]) | 853 | # if both exist, prefer libidn2 |
826 | AC_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. |
828 | libidn=$withval, libidn=yes) | 856 | # TODO: What we have right here can probably be improved. |
829 | if test "$libidn" != "no"; then | 857 | my_with_libidn=1 |
830 | if test "$libidn" != "yes"; then | 858 | AC_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 | [], |
834 | fi | 862 | [withval="yes"]) |
835 | libidn=no | 863 | AS_IF([test x_$withval = x_yes], |
836 | AC_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], |
839 | if test "$libidn" != "yes"; then | 867 | AC_MSG_NOTICE([Found idn/idna.h]), |
840 | AC_MSG_FAILURE([GNUnet requires libidn. | 868 | my_with_libidn=0))], |
841 | libidn-1.13 should be sufficient, newer versions work too.]) | 869 | [AS_IF([test x_$withval != x_no], |
842 | fi | 870 | [CFLAGS="$CFLAGS -I$withval/include" |
843 | AC_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 | |||
878 | my_with_libidn2=1 | ||
879 | AC_ARG_WITH(libidn2, | ||
880 | AS_HELP_STRING([--with-libidn2=pathname], | ||
881 | [Support IDN (needs libidn2)]), | ||
882 | [], | ||
883 | [withval="yes"]) | ||
884 | AS_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 | |||
896 | AC_MSG_CHECKING([if libidn can be used]) | ||
897 | # Check for LIBIDNs | ||
898 | there_can_only_be_one=1 | ||
899 | |||
900 | working_libidn1=0 | ||
901 | working_libidn2=0 | ||
902 | AS_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=", "])]) | ||
913 | AM_CONDITIONAL(HAVE_LIBIDN2, test x$working_libidn2 = x1) | ||
914 | AS_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])])])]) | ||
934 | AM_CONDITIONAL(HAVE_LIBIDN, test x$working_libidn1 = x1) | ||
935 | |||
936 | AS_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 |
847 | SAVE_LDFLAGS=$LDFLAGS | 940 | SAVE_LDFLAGS=$LDFLAGS |
@@ -1680,7 +1773,8 @@ contrib/Makefile | |||
1680 | doc/Makefile | 1773 | doc/Makefile |
1681 | doc/man/Makefile | 1774 | doc/man/Makefile |
1682 | doc/doxygen/Makefile | 1775 | doc/doxygen/Makefile |
1683 | doc/documentation/Makefile | 1776 | doc/handbook/Makefile |
1777 | doc/tutorial/Makefile | ||
1684 | m4/Makefile | 1778 | m4/Makefile |
1685 | po/Makefile.in | 1779 | po/Makefile.in |
1686 | src/Makefile | 1780 | src/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 |
1839 | if test "$mysqlfail" = "true" | 1933 | AS_IF([test "$mysqlfail" = "true"] |
1840 | then | 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.]) | ||
1842 | fi | ||
1843 | 1935 | ||
1844 | # sqlite | 1936 | # sqlite |
1845 | if test "x$sqlite" = "x0" | 1937 | AS_IF([test "x$sqlite" = "x0"], |
1846 | then | 1938 | [AC_MSG_ERROR([ERROR: sqlite3 not found, but sqlite3 is required.])]) |
1847 | AC_MSG_ERROR([ERROR: sqlite3 not found, but sqlite3 is required.]) | ||
1848 | fi | ||
1849 | 1939 | ||
1850 | # libgnurl | 1940 | # libgnurl |
1851 | if test "$gnurl" = "0" | 1941 | AS_IF([test "$gnurl" = "0"], |
1852 | then | 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 | ||
1860 | fi | ||
1861 | |||
1862 | 1946 | ||
1863 | # bluetooth | 1947 | # bluetooth |
1864 | if test "x$bluetooth" = "x0" | 1948 | AS_IF([test "x$bluetooth" = "x0"], |
1865 | then | 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 | |
1867 | fi | ||
1868 | 1951 | ||
1869 | # jansson | 1952 | # jansson |
1870 | if test "x$jansson" = "x0" | 1953 | AS_IF([test "x$jansson" = "x0"], |
1871 | then | 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.]) | ||
1873 | fi | ||
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 |
1880 | if test "$VAR_IPTABLES_BINARY" = "false" | 1961 | AS_IF([test "$VAR_IPTABLES_BINARY" = "false"], |
1881 | then | 1962 | [AC_MSG_NOTICE([WARNING: optional iptables not found])]) |
1882 | AC_MSG_NOTICE([WARNING: iptables not found. some modules may not have full functionality.]) | ||
1883 | fi | ||
1884 | 1963 | ||
1885 | # warn user if ifconfig is not found | 1964 | # warn user if ifconfig is not found |
1886 | if test "$VAR_IFCONFIG_BINARY" = "false" | 1965 | AS_IF([test "$VAR_IFCONFIG_BINARY" = "false"], |
1887 | then | 1966 | [AC_MSG_NOTICE([WARNING: optional ifconfig not found])]) |
1888 | AC_MSG_NOTICE([WARNING: ifconfig not found. some modules may not have full functionality.]) | ||
1889 | fi | ||
1890 | 1967 | ||
1891 | # warn user if upnpc binary is not found | 1968 | # warn user if upnpc binary is not found |
1892 | if test "$VAR_UPNPC_BINARY" = "false" | 1969 | AS_IF([test "$VAR_UPNPC_BINARY" = "false"], |
1893 | then | 1970 | [AC_MSG_NOTICE([WARNING: optional upnpc binary not found])]) |
1894 | AC_MSG_NOTICE([WARNING: upnpc binary not found. some modules may not have full functionality.]) | ||
1895 | fi | ||
1896 | 1971 | ||
1897 | #gnutls | 1972 | #gnutls |
1898 | if test x$gnutls != xtrue | 1973 | AS_IF([test x$gnutls != xtrue], |
1899 | then | 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"], |
1901 | else | 1976 | [AC_MSG_NOTICE([WARNING: GnuTLS has no DANE support, DANE validation will not be possible])])]) |
1902 | if test "x$gnutls_dane" != "x1" | ||
1903 | then | ||
1904 | AC_MSG_NOTICE([WARNING: GnuTLS has no DANE support, DANE validation will not be possible]) | ||
1905 | fi | ||
1906 | fi | ||
1907 | 1977 | ||
1908 | # java ports | 1978 | # java ports |
1909 | if test "x$enable_java_ports" = "xyes" | 1979 | AS_IF([test "x$enable_java_ports" = "xyes"], |
1910 | then | 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.]) | ||
1912 | fi | ||
1913 | 1981 | ||
1914 | # MHD | 1982 | # MHD |
1915 | if test "x$lmhd" != "x1" | 1983 | AS_IF([test "x$lmhd" != "x1"], |
1916 | then | 1984 | [AC_MSG_NOTICE([WARNING: optional libmicrohttpd not found])]) |
1917 | AC_MSG_NOTICE([WARNING: libmicrohttpd not found, http transport will not be installed.]) | ||
1918 | fi | ||
1919 | 1985 | ||
1920 | # conversation | 1986 | # conversation |
1921 | if test "x$conversation_backend" = "xnone" | 1987 | AS_IF([test "x$conversation_backend" = "xnone"], |
1922 | then | 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.]) | 1995 | AS_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 | 1998 | AS_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 | 2000 | AS_IF([test "x$working_libidn1" = x1], |
1935 | fi | 2001 | [AC_MSG_NOTICE([INFO: Using libidn1])]) |
1936 | |||
1937 | if test "$extractor" != 1 | ||
1938 | then | ||
1939 | AC_MSG_WARN([ERROR: libextractor not found, but various file-sharing functions require it]) | ||
1940 | fi | ||
1941 | 2002 | ||
1942 | AC_MSG_NOTICE([NOTICE: Database support is set to MySQL: $mysql, SQLite: $sqlite, Postgres: $postgres]) | 2003 | AC_MSG_NOTICE([NOTICE: Database support is set to MySQL: $mysql, SQLite: $sqlite, Postgres: $postgres]) |
1943 | 2004 | ||
1944 | if test "$enable_framework_build" = "yes" | 2005 | AS_IF([test "$enable_framework_build" = "yes"], |
1945 | then | 2006 | [AC_MSG_NOTICE([Mac OS X framework build enabled.])]) |
1946 | AC_MSG_NOTICE([Mac OS X framework build enabled.]) | ||
1947 | fi | ||
1948 | 2007 | ||
1949 | AC_MSG_NOTICE([******************************************** | 2008 | AC_MSG_NOTICE([******************************************** |
1950 | Please make sure NOW that you have created a user and group 'gnunet' | 2009 | Please make sure NOW that you have created a user and group 'gnunet' |