diff options
author | Evgeny Grin (Karlson2k) <k2k@narod.ru> | 2017-02-28 17:15:44 +0300 |
---|---|---|
committer | Evgeny Grin (Karlson2k) <k2k@narod.ru> | 2017-02-28 17:15:44 +0300 |
commit | 5cdd75f23ff9191b20107e0c56d3b0678683ac5d (patch) | |
tree | 1ce82ef78db0e5fa384dcd8cc4cef988f8057d5d | |
parent | a44c8f339c62b3d0c2c276e24058c30ebd29a31e (diff) | |
download | libmicrohttpd-5cdd75f23ff9191b20107e0c56d3b0678683ac5d.tar.gz libmicrohttpd-5cdd75f23ff9191b20107e0c56d3b0678683ac5d.zip |
configure.ac: skip large GnuTLS and gcrypt tests if HTTPS is disabled
-rw-r--r-- | configure.ac | 37 |
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]) | |||
1088 | AM_CONDITIONAL([HAVE_ZZUF], [test "x$have_zzuf" = "xyes"]) | 1088 | AM_CONDITIONAL([HAVE_ZZUF], [test "x$have_zzuf" = "xyes"]) |
1089 | AM_CONDITIONAL([HAVE_SOCAT], [test "x$have_socat" = "xyes"]) | 1089 | AM_CONDITIONAL([HAVE_SOCAT], [test "x$have_socat" = "xyes"]) |
1090 | 1090 | ||
1091 | GNUTLS_CPPFLAGS="" | ||
1092 | GNUTLS_LDFLAGS="" | ||
1093 | have_gnutls=no | ||
1094 | have_gnutls_sni=no | ||
1095 | have_gcrypt=no | ||
1096 | |||
1097 | # optional: HTTPS support. Enabled by default | ||
1098 | AC_ARG_ENABLE([https], | ||
1099 | [AS_HELP_STRING([--enable-https], | ||
1100 | [enable HTTPS support (yes, no, auto)[auto]])], | ||
1101 | [enable_https=${enableval}]) | ||
1102 | if test "x$enable_https" != "xno" | ||
1103 | then | ||
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 |
1093 | AM_PATH_LIBGCRYPT([1.2.2], [have_gcrypt=yes], [have_gcrypt=no]) | 1109 | AM_PATH_LIBGCRYPT([1.2.2], [have_gcrypt=yes], [have_gcrypt=no]) |
@@ -1104,10 +1120,6 @@ then | |||
1104 | fi | 1120 | fi |
1105 | 1121 | ||
1106 | # gnutls | 1122 | # gnutls |
1107 | GNUTLS_CPPFLAGS="" | ||
1108 | GNUTLS_LDFLAGS="" | ||
1109 | have_gnutls=no | ||
1110 | have_gnutls_sni=no | ||
1111 | have_gnutls_pkgcfg=no | 1123 | have_gnutls_pkgcfg=no |
1112 | AC_MSG_CHECKING([[how to find GnuTLS library]]) | 1124 | AC_MSG_CHECKING([[how to find GnuTLS library]]) |
1113 | AC_ARG_WITH([[gnutls]], | 1125 | AC_ARG_WITH([[gnutls]], |
@@ -1209,22 +1221,14 @@ AS_IF([test "x$with_gnutls" != "xno" && test "x$have_gnutls" != "xyes"], | |||
1209 | 1221 | ||
1210 | AS_IF([test "x$have_gnutls" != "xyes" && test "x$with_gnutls" = "xyes"], [AC_MSG_ERROR([[can't find usable libgnutls]])]) | 1222 | AS_IF([test "x$have_gnutls" != "xyes" && test "x$with_gnutls" = "xyes"], [AC_MSG_ERROR([[can't find usable libgnutls]])]) |
1211 | 1223 | ||
1212 | AM_CONDITIONAL(HAVE_GNUTLS, test "x$have_gnutls" = "xyes") | ||
1213 | AM_CONDITIONAL([HAVE_GNUTLS_SNI], [test "x$have_gnutls_sni" = "xyes"]) | ||
1214 | |||
1215 | AC_SUBST([GNUTLS_CPPFLAGS]) | 1224 | AC_SUBST([GNUTLS_CPPFLAGS]) |
1216 | AC_SUBST([GNUTLS_CFLAGS]) | 1225 | AC_SUBST([GNUTLS_CFLAGS]) |
1217 | AC_SUBST([GNUTLS_LDFLAGS]) | 1226 | AC_SUBST([GNUTLS_LDFLAGS]) |
1218 | AC_SUBST([GNUTLS_LIBS]) | 1227 | AC_SUBST([GNUTLS_LIBS]) |
1219 | 1228 | ||
1220 | # optional: HTTPS support. Enabled by default | 1229 | # |
1221 | AC_MSG_CHECKING(whether to support HTTPS) | 1230 | # End of large unindented block |
1222 | AC_ARG_ENABLE([https], | 1231 | # |
1223 | [AS_HELP_STRING([--enable-https], | ||
1224 | [enable HTTPS support (yes, no, auto)[auto]])], | ||
1225 | [enable_https=${enableval}]) | ||
1226 | if test "x$enable_https" != "xno" | ||
1227 | then | ||
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 | |||
1253 | else | 1257 | else |
1254 | MSG_HTTPS="no (disabled)" | 1258 | MSG_HTTPS="no (disabled)" |
1255 | fi | 1259 | fi |
1260 | AC_MSG_CHECKING(whether to support HTTPS) | ||
1256 | AC_MSG_RESULT([$MSG_HTTPS]) | 1261 | AC_MSG_RESULT([$MSG_HTTPS]) |
1257 | 1262 | ||
1263 | AM_CONDITIONAL([HAVE_GNUTLS], [[test "x$have_gnutls" = "xyes"]]) | ||
1264 | AM_CONDITIONAL([HAVE_GNUTLS_SNI], [[test "x$have_gnutls_sni" = "xyes"]]) | ||
1258 | AM_CONDITIONAL([ENABLE_HTTPS], [test "x$enable_https" = "xyes"]) | 1265 | AM_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 |