@@ -58,13 +58,14 @@ AC_CHECK_HEADER([regex.h],[],[AC_MSG_ERROR("regex.h not found")])
5858AC_CHECK_HEADER ( [ sys/stat.h] ,[ ] ,[ AC_MSG_ERROR ( "sys/stat.h not found" ) ] )
5959AC_CHECK_HEADER ( [ sys/types.h] ,[ ] ,[ AC_MSG_ERROR ( "sys/types.h not found" ) ] )
6060AC_CHECK_HEADER ( [ arpa/inet.h] ,[ ] ,[ AC_MSG_ERROR ( "arpa/inet.h not found" ) ] )
61- AC_CHECK_HEADER ( [ gnutls/gnutls.h] ,[ ] ,[ AC_MSG_ERROR ( "gnutls/gnutls.h not found" ) ] )
6261AC_CHECK_HEADER ( [ signal.h] ,[ ] ,[ AC_MSG_ERROR ( "signal.h not found" ) ] )
6362
63+ AC_CHECK_HEADER ( [ gnutls/gnutls.h] ,[ have_gnutls="yes"] ,[ AC_MSG_WARN ( "gnutls/gnutls.h not found. TLS will be disabled" ) ; have_gnutls="no"] )
64+
6465# Checks for libmicrohttpd
65- # PKG_CHECK_MODULES([LIBMICROHTTPD],[libmicrohttpd >= 0.9.9],[],[AC_MSG_ERROR("libmicrohttpd not present or too old - install libmicrohttpd >= 0.9.9")])
66- AC_CHECK_HEADER ( [ microhttpd.h] ,[ ] ,[ AC_MSG_ERROR ( "Microhttpd header files not found. Please use a version >= 0.9.9." ) ] )
67- AC_CHECK_LIB ( [ microhttpd] ,[ MHD_start_daemon] ,[ ] ,[ AC_MSG_ERROR ( "Microhttpd header files not found. Please use a version >= 0.9.9." ) ] )
66+ PKG_CHECK_MODULES([ LIBMICROHTTPD] ,[ libmicrohttpd >= 0.9.9] ,[ ] ,[ AC_MSG_ERROR ( "libmicrohttpd not present or too old - install libmicrohttpd >= 0.9.9" ) ] )
67+ # AC_CHECK_HEADER([microhttpd.h],[],[AC_MSG_ERROR("Microhttpd header files not found. Please use a version >= 0.9.9.")])
68+ # AC_CHECK_LIB([microhttpd],[MHD_start_daemon],[],[AC_MSG_ERROR("Microhttpd header files not found. Please use a version >= 0.9.9.")])
6869
6970# Checks for typedefs, structures, and compiler characteristics.
7071AC_TYPE_SIZE_T
@@ -138,6 +139,10 @@ else
138139 AM_CXXFLAGS="$AM_CXXFLAGS -O3"
139140fi
140141
142+ if test x"have_gnutls" = x"yes"; then
143+ AM_CXXFLAGS="$AM_CXXFLAGS -DHAVE_GNUTLS"
144+ fi
145+
141146AC_MSG_CHECKING ( [ whether to use c++0x std classes] )
142147AC_ARG_ENABLE ( [ cpp0x] ,
143148 [ AS_HELP_STRING ( [ --enable-cpp0x] ,
@@ -378,5 +383,6 @@ AC_MSG_NOTICE([Configuration Summary:
378383 License : LGPL only
379384 Languages : ${LANGUAGES}
380385 Debug : ${debugit}
386+ TLS Enabled : ${have_gnutls}
381387 C++0x : ${cpp0x}
382388] )
0 commit comments