aboutsummaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2018-10-25 15:05:21 +0200
committerChristian Grothoff <christian@grothoff.org>2018-10-25 15:05:21 +0200
commit8a4b969fd2e9fb399dfd1d9d1569e95a77d599bb (patch)
treec262d6cff5f4d795270005366417b67d08549c7c /configure.ac
parentb64879a11e2062b78e984b8e5c22dc26ba224668 (diff)
downloadgnunet-8a4b969fd2e9fb399dfd1d9d1569e95a77d599bb.tar.gz
gnunet-8a4b969fd2e9fb399dfd1d9d1569e95a77d599bb.zip
cleaning up configure, in particular the idn.h checks
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac273
1 files changed, 98 insertions, 175 deletions
diff --git a/configure.ac b/configure.ac
index f0ab98390..d2f2bddd8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -839,34 +839,20 @@ AC_ARG_WITH(libidn,
839 [Support IDN (needs libidn)]), 839 [Support IDN (needs libidn)]),
840 [], 840 [],
841 [withval="yes"]) 841 [withval="yes"])
842if test x_$withval = x_yes; then 842AS_IF([test x_$withval = x_yes],
843 for dir in /usr/local /opt/local /usr/pkg /usr/sfw; do 843 [AC_CHECK_HEADERS([idna.h],
844 if test -f "$dir/include/idna.h"; then 844 AC_MSG_NOTICE([Found idna.h]),
845 CFLAGS="$CFLAGS -I$dir/include" 845 AC_CHECK_HEADERS([idn/idna.h],
846 LDFLAGS="$LDFLAGS -L$dir/lib" 846 AC_MSG_NOTICE([Found idn/idna.h]),
847 AC_MSG_NOTICE([Found libidn in $dir]) 847 my_with_libidn=0))],
848 break 848 [AS_IF([test x_$withval != x_no],
849 fi 849 [CFLAGS="$CFLAGS -I$withval/include"
850 if test -f "$dir/include/idn/idna.h"; then 850 LDFLAGS="$LDFLAGS -L$withval/lib"
851 CFLAGS="$CFLAGS -I$dir/include/idn" 851 AC_CHECK_HEADERS([idna.h],
852 LDFLAGS="$LDFLAGS -L$dir/lib" 852 AC_MSG_NOTICE([Found idna.h]),
853 AC_MSG_NOTICE([Found libidn in $dir]) 853 [AC_MSG_NOTICE([Failed to find idna.h])
854 break 854 my_with_libidn=0])],
855 fi 855 [my_with_libidn=0])])
856 done
857 if test -f "/usr/include/idn/idna.h"; then
858 CFLAGS="$CFLAGS -I/usr/include/idn"
859 #LDFLAGS="$LDFLAGS -L/usr/lib"
860 AC_MSG_NOTICE([Found libidn in /usr])
861 fi
862else
863 if test x_$withval != x_no; then
864 CFLAGS="$CFLAGS -I$withval/include"
865 LDFLAGS="$LDFLAGS -L$withval/lib"
866 else
867 my_with_libidn=0
868 fi
869fi
870 856
871my_with_libidn2=1 857my_with_libidn2=1
872AC_ARG_WITH(libidn2, 858AC_ARG_WITH(libidn2,
@@ -874,34 +860,17 @@ AC_ARG_WITH(libidn2,
874 [Support IDN (needs libidn2)]), 860 [Support IDN (needs libidn2)]),
875 [], 861 [],
876 [withval="yes"]) 862 [withval="yes"])
877if test x_$withval = x_yes; then 863AS_IF([test x_$withval = x_yes],
878 for dir in /usr/local /opt/local /usr/pkg /usr/sfw; do 864 [AC_CHECK_HEADERS([idn2.h],
879 if test -f "$dir/include/idn2.h"; then 865 AC_MSG_NOTICE([Found idn2.h]),
880 CFLAGS="$CFLAGS -I$dir/include" 866 AC_CHECK_HEADERS([idn2/idn2.h],
881 LDFLAGS="$LDFLAGS -L$dir/lib" 867 AC_MSG_NOTICE([Found idn2/idn2.h]),
882 AC_MSG_NOTICE([Found libidn2 in $dir]) 868 [AC_MSG_NOTICE([Failed to find idn2.h])
883 break 869 my_with_libidn2=0]))],
884 fi 870 [AS_IF([test x_$withval != x_no],
885 if test -f "$dir/include/idn2/idn2.h"; then 871 [CFLAGS="$CFLAGS -I$withval/include"
886 CFLAGS="$CFLAGS -I$dir/include/idn2" 872 LDFLAGS="$LDFLAGS -L$withval/lib"],
887 LDFLAGS="$LDFLAGS -L$dir/lib" 873 [my_with_libidn2=0])])
888 AC_MSG_NOTICE([Found libidn2 in $dir])
889 break
890 fi
891 done
892 if test -f "/usr/include/idn2/idn2.h"; then
893 CFLAGS="$CFLAGS -I/usr/include/idn2"
894 #LDFLAGS="$LDFLAGS -L/usr/lib"
895 AC_MSG_NOTICE([Found libidn2 in /usr])
896 fi
897else
898 if test x_$withval != x_no; then
899 CFLAGS="$CFLAGS -I$withval/include"
900 LDFLAGS="$LDFLAGS -L$withval/lib"
901 else
902 my_with_libidn2=0
903 fi
904fi
905 874
906AC_MSG_CHECKING([if libidn can be used]) 875AC_MSG_CHECKING([if libidn can be used])
907# Check for LIBIDNs 876# Check for LIBIDNs
@@ -909,53 +878,42 @@ there_can_only_be_one=1
909 878
910working_libidn1=0 879working_libidn1=0
911working_libidn2=0 880working_libidn2=0
912if test $my_with_libidn2 = 1 881AS_IF([test $my_with_libidn2 = 1],
913then 882 [AC_MSG_NOTICE([Checking for libidn2])
914 AC_MSG_NOTICE([Checking for libidn2]) 883 AC_CHECK_LIB([idn2],
915 AC_CHECK_LIB([idn2], 884 [idn2_to_unicode_8z8z],
916 [idn2_to_unicode_8z8z], 885 [working_libidn2=1
917 [working_libidn2=1 886 LIBS="-lidn2 $LIBS"
918 LIBS="-lidn2 $LIBS" 887 AC_DEFINE_UNQUOTED([HAVE_LIBIDN2],
919 AC_DEFINE_UNQUOTED([HAVE_LIBIDN2], 888 [1],
920 [1],
921 [Define to 1 if you have 'libidn2' (-lidn).])], 889 [Define to 1 if you have 'libidn2' (-lidn).])],
922 [MISSING_DEPS="${MISSING_DEPS}${MISSING_SEP}libidn2" 890 [MISSING_DEPS="${MISSING_DEPS}${MISSING_SEP}libidn2"
923 MISSING_SEP=", "]) 891 MISSING_SEP=", "])])
924fi
925AM_CONDITIONAL(HAVE_LIBIDN2, test x$working_libidn2 = x1) 892AM_CONDITIONAL(HAVE_LIBIDN2, test x$working_libidn2 = x1)
926if test $working_libidn2 = 0 893AS_IF([test $working_libidn2 = 0],
927then 894 [AS_IF([test $my_with_libidn = 1],
928 if test $my_with_libidn = 1 895 [AC_MSG_NOTICE([Checking for libidn])
929 then 896 AC_CHECK_LIB([idn],
930 AC_MSG_NOTICE([Checking for libidn]) 897 [idna_to_ascii_8z],
931 AC_CHECK_LIB([idn], 898 [working_libidn1=1
932 [idna_to_ascii_8z], 899 LIBS="-lidn $LIBS"
933 [working_libidn1=1
934 LIBS="-lidn $LIBS"
935 AC_DEFINE_UNQUOTED([HAVE_LIBIDN], 900 AC_DEFINE_UNQUOTED([HAVE_LIBIDN],
936 [1], 901 [1],
937 [Define to 1 if you have 'libidn' (-lidn).])], 902 [Define to 1 if you have 'libidn' (-lidn).])],
938 [there_can_only_be_one=0]) 903 [there_can_only_be_one=0])],
939 else 904 [AS_IF([test $my_with_libidn2 = 1],
940 if test $my_with_libidn2 = 1 905 [there_can_only_be_one=0
941 then 906 AC_MSG_FAILURE([* There can only be one libidn.
942 there_can_only_be_one=0 907 * Provide either libidn >= 1.13
943 AC_MSG_FAILURE([* There can only be one libidn. 908 * or
944 * Provide either libidn >= 1.13 909 * libidn2 to the configure
945 * or 910 * script via
946 * libidn2 to the configure 911 * --with-libidn2
947 * script via 912 * --with-libidn])])])])
948 * --with-libidn2
949 * --with-libidn])
950 fi
951 fi
952fi
953AM_CONDITIONAL(HAVE_LIBIDN, test x$working_libidn1 = x1) 913AM_CONDITIONAL(HAVE_LIBIDN, test x$working_libidn1 = x1)
954 914
955if test $there_can_only_be_one = 0 915AS_IF([test $there_can_only_be_one = 0],
956then 916 [AC_MSG_FAILURE([Missing dependencies: $MISSING_DEPS])])
957 AC_MSG_FAILURE([Missing dependencies: $MISSING_DEPS])
958fi
959 917
960# test for zlib 918# test for zlib
961SAVE_LDFLAGS=$LDFLAGS 919SAVE_LDFLAGS=$LDFLAGS
@@ -1950,115 +1908,80 @@ AC_OUTPUT
1950# Finally: summary! 1908# Finally: summary!
1951 1909
1952# warn user if mysql found but not used due to version 1910# warn user if mysql found but not used due to version
1953if test "$mysqlfail" = "true" 1911AS_IF([test "$mysqlfail" = "true"]
1954then 1912 [AC_MSG_NOTICE([WARNING: optional MySQL not found (or too old)])])
1955 AC_MSG_NOTICE([WARNING: MySQL found, but too old. MySQL support will not be compiled.])
1956fi
1957 1913
1958# sqlite 1914# sqlite
1959if test "x$sqlite" = "x0" 1915AS_IF([test "x$sqlite" = "x0"],
1960then 1916 [AC_MSG_ERROR([ERROR: sqlite3 not found, but sqlite3 is required.])])
1961 AC_MSG_ERROR([ERROR: sqlite3 not found, but sqlite3 is required.])
1962fi
1963 1917
1964# libgnurl 1918# libgnurl
1965if test "$gnurl" = "0" 1919AS_IF([test "$gnurl" = "0"],
1966then 1920 [AS_IF([test "x$curl" = "xfalse"],
1967 if test "x$curl" = "xfalse" 1921 [AC_MSG_NOTICE([WARNING: libgnurl not found. http client support will not be compiled.])
1968 then 1922 AC_MSG_WARN([ERROR: libgnurl not found. hostlist daemon will not be compiled, and you probably WANT the hostlist daemon])],
1969 AC_MSG_NOTICE([WARNING: libgnurl not found. http client support will not be compiled.]) 1923 [AC_MSG_NOTICE([WARNING: libgnurl not found, trying to use libcurl-gnutls instead.])])])
1970 AC_MSG_WARN([ERROR: libgnurl not found. hostlist daemon will not be compiled, and you probably WANT the hostlist daemon])
1971 else
1972 AC_MSG_NOTICE([WARNING: libgnurl not found, trying to use libcurl-gnutls instead.])
1973 fi
1974fi
1975
1976 1924
1977# bluetooth 1925# bluetooth
1978if test "x$bluetooth" = "x0" 1926AS_IF([test "x$bluetooth" = "x0"],
1979then 1927 [AC_MSG_NOTICE([WARNING: optional bluetooth library not found.])])
1980 AC_MSG_NOTICE([WARNING: bluetooth library not found. bluetooth support will not be compiled.]) 1928
1981fi
1982 1929
1983# jansson 1930# jansson
1984if test "x$jansson" = "x0" 1931AS_IF([test "x$jansson" = "x0"],
1985then 1932 [AC_MSG_NOTICE([WARNING: optional jansson library not found.])])
1986 AC_MSG_NOTICE([WARNING: jansson library not found. json support will not be compiled.])
1987fi
1988 1933
1989# 1934#
1990# FIXME: `some modules' -> be more specific which exact modules. 1935# FIXME: `some modules' -> be more specific which exact modules.
1991# 1936#
1992 1937
1993# warn user if iptables is not found 1938# warn user if iptables is not found
1994if test "$VAR_IPTABLES_BINARY" = "false" 1939AS_IF([test "$VAR_IPTABLES_BINARY" = "false"],
1995then 1940 [AC_MSG_NOTICE([WARNING: optional iptables not found])])
1996AC_MSG_NOTICE([WARNING: iptables not found. some modules may not have full functionality.])
1997fi
1998 1941
1999# warn user if ifconfig is not found 1942# warn user if ifconfig is not found
2000if test "$VAR_IFCONFIG_BINARY" = "false" 1943AS_IF([test "$VAR_IFCONFIG_BINARY" = "false"],
2001then 1944 [AC_MSG_NOTICE([WARNING: optional ifconfig not found])])
2002AC_MSG_NOTICE([WARNING: ifconfig not found. some modules may not have full functionality.])
2003fi
2004 1945
2005# warn user if upnpc binary is not found 1946# warn user if upnpc binary is not found
2006if test "$VAR_UPNPC_BINARY" = "false" 1947AS_IF([test "$VAR_UPNPC_BINARY" = "false"],
2007then 1948 [AC_MSG_NOTICE([WARNING: optional upnpc binary not found])])
2008AC_MSG_NOTICE([WARNING: upnpc binary not found. some modules may not have full functionality.])
2009fi
2010 1949
2011#gnutls 1950#gnutls
2012if test x$gnutls != xtrue 1951AS_IF([test x$gnutls != xtrue],
2013then 1952 [AC_MSG_NOTICE([WARNING: GnuTLS not found, gnunet-gns-proxy will not be built])],
2014 AC_MSG_NOTICE([WARNING: GnuTLS not found, gnunet-gns-proxy will not be built]) 1953 [AS_IF([test "x$gnutls_dane" != "x1"],
2015else 1954 [AC_MSG_NOTICE([WARNING: GnuTLS has no DANE support, DANE validation will not be possible])])])
2016if test "x$gnutls_dane" != "x1"
2017then
2018 AC_MSG_NOTICE([WARNING: GnuTLS has no DANE support, DANE validation will not be possible])
2019fi
2020fi
2021 1955
2022# java ports 1956# java ports
2023if test "x$enable_java_ports" = "xyes" 1957AS_IF([test "x$enable_java_ports" = "xyes"],
2024then 1958 [AC_MSG_NOTICE([NOTICE: Opening ports for gnunet-java bindings by default.])])
2025 AC_MSG_NOTICE([NOTICE: Opening ports for gnunet-java bindings by default.])
2026fi
2027 1959
2028# MHD 1960# MHD
2029if test "x$lmhd" != "x1" 1961AS_IF([test "x$lmhd" != "x1"],
2030then 1962 [AC_MSG_NOTICE([WARNING: optional libmicrohttpd not found])])
2031 AC_MSG_NOTICE([WARNING: libmicrohttpd not found, http transport will not be installed.])
2032fi
2033 1963
2034# conversation 1964# conversation
2035if test "x$conversation_backend" = "xnone" 1965AS_IF([test "x$conversation_backend" = "xnone"],
2036then 1966 [AS_IF([test "x$pulse" != "x1"],
2037 if test "x$pulse" != "x1" 1967 [AC_MSG_NOTICE([WARNING: libpulse(audio) not found, conversation will not be built.])])
2038 then 1968 AS_IF([test "x$opus" != "x1"],
2039 AC_MSG_NOTICE([WARNING: libpulse(audio) not found, conversation will not be built.]) 1969 [AC_MSG_NOTICE([WARNING: libopus not found, conversation will not be built.])])
2040 fi 1970 AS_IF([test "x$gst" != "x1"],
2041 if test "x$opus" != "x1" 1971 [AC_MSG_NOTICE([WARNING: GStreamer not found, conversation will not be built.])])])
2042 then 1972
2043 AC_MSG_NOTICE([WARNING: libopus not found, conversation will not be built.]) 1973AS_IF([test "$extractor" != 1],
2044 fi 1974 [AC_MSG_WARN([ERROR: libextractor not found, but various file-sharing functions require it])])
2045 if test "x$gst" != "x1" 1975
2046 then 1976AS_IF([test "x$working_libidn2" = x1],
2047 AC_MSG_NOTICE([WARNING: GStreamer not found, conversation will not be built.]) 1977 [AC_MSG_NOTICE([INFO: Using libidn2])])
2048 fi 1978AS_IF([test "x$working_libidn1" = x1],
2049fi 1979 [AC_MSG_NOTICE([INFO: Using libidn1])])
2050
2051if test "$extractor" != 1
2052then
2053 AC_MSG_WARN([ERROR: libextractor not found, but various file-sharing functions require it])
2054fi
2055 1980
2056AC_MSG_NOTICE([NOTICE: Database support is set to MySQL: $mysql, SQLite: $sqlite, Postgres: $postgres]) 1981AC_MSG_NOTICE([NOTICE: Database support is set to MySQL: $mysql, SQLite: $sqlite, Postgres: $postgres])
2057 1982
2058if test "$enable_framework_build" = "yes" 1983AS_IF([test "$enable_framework_build" = "yes"],
2059then 1984 [AC_MSG_NOTICE([Mac OS X framework build enabled.])])
2060 AC_MSG_NOTICE([Mac OS X framework build enabled.])
2061fi
2062 1985
2063AC_MSG_NOTICE([******************************************** 1986AC_MSG_NOTICE([********************************************
2064Please make sure NOW that you have created a user and group 'gnunet' 1987Please make sure NOW that you have created a user and group 'gnunet'