aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvgeny Grin (Karlson2k) <k2k@narod.ru>2017-02-28 17:15:44 +0300
committerEvgeny Grin (Karlson2k) <k2k@narod.ru>2017-02-28 17:15:44 +0300
commit5cdd75f23ff9191b20107e0c56d3b0678683ac5d (patch)
tree1ce82ef78db0e5fa384dcd8cc4cef988f8057d5d
parenta44c8f339c62b3d0c2c276e24058c30ebd29a31e (diff)
downloadlibmicrohttpd-5cdd75f23ff9191b20107e0c56d3b0678683ac5d.tar.gz
libmicrohttpd-5cdd75f23ff9191b20107e0c56d3b0678683ac5d.zip
configure.ac: skip large GnuTLS and gcrypt tests if HTTPS is disabled
-rw-r--r--configure.ac37
1 files changed, 22 insertions, 15 deletions
diff --git a/configure.ac b/configure.ac
index d1ce5d42..5fbfb83b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1088,6 +1088,22 @@ AC_CHECK_PROG([have_socat],[socat], [yes], [no])
1088AM_CONDITIONAL([HAVE_ZZUF], [test "x$have_zzuf" = "xyes"]) 1088AM_CONDITIONAL([HAVE_ZZUF], [test "x$have_zzuf" = "xyes"])
1089AM_CONDITIONAL([HAVE_SOCAT], [test "x$have_socat" = "xyes"]) 1089AM_CONDITIONAL([HAVE_SOCAT], [test "x$have_socat" = "xyes"])
1090 1090
1091GNUTLS_CPPFLAGS=""
1092GNUTLS_LDFLAGS=""
1093have_gnutls=no
1094have_gnutls_sni=no
1095have_gcrypt=no
1096
1097# optional: HTTPS support. Enabled by default
1098AC_ARG_ENABLE([https],
1099 [AS_HELP_STRING([--enable-https],
1100 [enable HTTPS support (yes, no, auto)[auto]])],
1101 [enable_https=${enableval}])
1102if test "x$enable_https" != "xno"
1103then
1104#
1105# Next block is large unindented block
1106#
1091 1107
1092# libgcrypt linkage: required for HTTPS support 1108# libgcrypt linkage: required for HTTPS support
1093AM_PATH_LIBGCRYPT([1.2.2], [have_gcrypt=yes], [have_gcrypt=no]) 1109AM_PATH_LIBGCRYPT([1.2.2], [have_gcrypt=yes], [have_gcrypt=no])
@@ -1104,10 +1120,6 @@ then
1104fi 1120fi
1105 1121
1106# gnutls 1122# gnutls
1107GNUTLS_CPPFLAGS=""
1108GNUTLS_LDFLAGS=""
1109have_gnutls=no
1110have_gnutls_sni=no
1111have_gnutls_pkgcfg=no 1123have_gnutls_pkgcfg=no
1112AC_MSG_CHECKING([[how to find GnuTLS library]]) 1124AC_MSG_CHECKING([[how to find GnuTLS library]])
1113AC_ARG_WITH([[gnutls]], 1125AC_ARG_WITH([[gnutls]],
@@ -1209,22 +1221,14 @@ AS_IF([test "x$with_gnutls" != "xno" && test "x$have_gnutls" != "xyes"],
1209 1221
1210AS_IF([test "x$have_gnutls" != "xyes" && test "x$with_gnutls" = "xyes"], [AC_MSG_ERROR([[can't find usable libgnutls]])]) 1222AS_IF([test "x$have_gnutls" != "xyes" && test "x$with_gnutls" = "xyes"], [AC_MSG_ERROR([[can't find usable libgnutls]])])
1211 1223
1212AM_CONDITIONAL(HAVE_GNUTLS, test "x$have_gnutls" = "xyes")
1213AM_CONDITIONAL([HAVE_GNUTLS_SNI], [test "x$have_gnutls_sni" = "xyes"])
1214
1215AC_SUBST([GNUTLS_CPPFLAGS]) 1224AC_SUBST([GNUTLS_CPPFLAGS])
1216AC_SUBST([GNUTLS_CFLAGS]) 1225AC_SUBST([GNUTLS_CFLAGS])
1217AC_SUBST([GNUTLS_LDFLAGS]) 1226AC_SUBST([GNUTLS_LDFLAGS])
1218AC_SUBST([GNUTLS_LIBS]) 1227AC_SUBST([GNUTLS_LIBS])
1219 1228
1220# optional: HTTPS support. Enabled by default 1229#
1221AC_MSG_CHECKING(whether to support HTTPS) 1230# End of large unindented block
1222AC_ARG_ENABLE([https], 1231#
1223 [AS_HELP_STRING([--enable-https],
1224 [enable HTTPS support (yes, no, auto)[auto]])],
1225 [enable_https=${enableval}])
1226if test "x$enable_https" != "xno"
1227then
1228 AS_IF([test "x$have_gnutls" = "xyes" && test "x$have_gcrypt" = "xyes"], [ 1232 AS_IF([test "x$have_gnutls" = "xyes" && test "x$have_gcrypt" = "xyes"], [
1229 AC_DEFINE([[HTTPS_SUPPORT]],[[1]],[Define to 1 if libmicrohttpd is compiled with HTTPS support.]) 1233 AC_DEFINE([[HTTPS_SUPPORT]],[[1]],[Define to 1 if libmicrohttpd is compiled with HTTPS support.])
1230 enable_https=yes 1234 enable_https=yes
@@ -1253,8 +1257,11 @@ then
1253else 1257else
1254 MSG_HTTPS="no (disabled)" 1258 MSG_HTTPS="no (disabled)"
1255fi 1259fi
1260AC_MSG_CHECKING(whether to support HTTPS)
1256AC_MSG_RESULT([$MSG_HTTPS]) 1261AC_MSG_RESULT([$MSG_HTTPS])
1257 1262
1263AM_CONDITIONAL([HAVE_GNUTLS], [[test "x$have_gnutls" = "xyes"]])
1264AM_CONDITIONAL([HAVE_GNUTLS_SNI], [[test "x$have_gnutls_sni" = "xyes"]])
1258AM_CONDITIONAL([ENABLE_HTTPS], [test "x$enable_https" = "xyes"]) 1265AM_CONDITIONAL([ENABLE_HTTPS], [test "x$enable_https" = "xyes"])
1259 1266
1260# optional: HTTP Basic Auth support. Enabled by default 1267# optional: HTTP Basic Auth support. Enabled by default