summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xconfigure75
-rw-r--r--configure.ac67
-rwxr-xr-xdebian/rules4
3 files changed, 129 insertions, 17 deletions
diff --git a/configure b/configure
index e87797e..637c6b6 100755
--- a/configure
+++ b/configure
@@ -775,6 +775,7 @@ with_gnu_ld
with_sysroot
enable_libtool_lock
with_zlib
+enable_https
enable_online_unit_tests
'
ac_precious_vars='build_alias
@@ -1417,7 +1418,9 @@ Optional Features:
--enable-fast-install[=PKGS]
optimize for fast installation [default=yes]
--disable-libtool-lock avoid locking (might break parallel builds)
- --enable-online-unit-tests=[yes/no]
+ --enable-https=[yes/no/auto]
+ Enable https support [default=yes]
+ --enable-online-unit-tests=[yes/no/auto]
Enable online-unit-tests [default=yes]
Optional Packages:
@@ -15686,6 +15689,36 @@ fi
### OpenSSL
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable https support" >&5
+$as_echo_n "checking whether to enable https support... " >&6; }
+# Check whether --enable-https was given.
+if test "${enable_https+set}" = set; then :
+ enableval=$enable_https;
+ case "${enableval}" in
+ no|yes|auto)
+ https_support=$enableval
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enableval" >&5
+$as_echo "$enableval" >&6; }
+ ;;
+ *)
+ as_fn_error expected yes/no/auto "bad value for https" "$LINENO" 5
+ ;;
+ esac
+
+else
+
+ https_support=yes
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $https_support=" >&5
+$as_echo "$https_support=" >&6; }
+
+fi
+
+if test x"$https_support" = x"no"; then
+{ $as_echo "$as_me:${as_lineno-$LINENO}: disabling https support" >&5
+$as_echo "$as_me: disabling https support" >&6;}
+$as_echo "#define HTS_USEOPENSSL 0" >>confdefs.h
+
+else
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_library_init in -lssl" >&5
$as_echo_n "checking for SSL_library_init in -lssl... " >&6; }
if ${ac_cv_lib_ssl_SSL_library_init+:} false; then :
@@ -15723,16 +15756,26 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_SSL_library_init" >&5
$as_echo "$ac_cv_lib_ssl_SSL_library_init" >&6; }
if test "x$ac_cv_lib_ssl_SSL_library_init" = xyes; then :
- OPENSSL_LIBS="-lcrypto -lssl"
+
+ OPENSSL_LIBS="-lcrypto -lssl"
$as_echo "#define HTS_USEOPENSSL 1" >>confdefs.h
+
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: not necessary" >&5
-$as_echo "not necessary" >&6; }
+
+ if test x"$https_support" = x"yes"; then
+ as_fn_error $? "not available" "$LINENO" 5
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: not available" >&5
+$as_echo "not available" >&6; }
+ fi
+
+
fi
+fi
### Support IPv6
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo in -lc" >&5
@@ -16392,17 +16435,35 @@ $as_echo "#define PREFER_PORTABLE_SNPRINTF 1" >>confdefs.h
fi
-## Options
+## Online unit tests
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable online unit tests" >&5
+$as_echo_n "checking whether to enable online unit tests... " >&6; }
# Check whether --enable-online-unit-tests was given.
if test "${enable_online_unit_tests+set}" = set; then :
- enableval=$enable_online_unit_tests; online_unit_tests=$enableval
+ enableval=$enable_online_unit_tests;
+ case "${enableval}" in
+ no|yes|auto)
+ online_unit_tests=$enableval
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enableval" >&5
+$as_echo "$enableval" >&6; }
+ ;;
+ *)
+ as_fn_error expected yes/no/auto "bad value for online-unit-tests" "$LINENO" 5
+ ;;
+ esac
+
else
- online_unit_tests=maybe
+
+ online_unit_tests=no
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
fi
ONLINE_UNIT_TESTS=$online_unit_tests
+# Final output
ac_config_files="$ac_config_files Makefile src/Makefile man/Makefile m4/Makefile templates/Makefile lang/Makefile html/Makefile libtest/Makefile tests/Makefile"
cat >confcache <<\_ACEOF
diff --git a/configure.ac b/configure.ac
index a3175a4..9febbef 100644
--- a/configure.ac
+++ b/configure.ac
@@ -122,13 +122,48 @@ AC_MSG_WARN([*** in_addr_t not found]),
CHECK_ZLIB()
### OpenSSL
-AC_CHECK_LIB(ssl, SSL_library_init, [OPENSSL_LIBS="-lcrypto -lssl"
-AC_DEFINE(HTS_USEOPENSSL, 1,[Check for OpenSSL])], AC_MSG_RESULT([not necessary]))
+AC_MSG_CHECKING(whether to enable https support)
+AC_ARG_ENABLE([https],
+ [AC_HELP_STRING([--enable-https=@<:@yes/no/auto@:>@],
+ [Enable https support @<:@default=yes@:>@])],
+ [
+ case "${enableval}" in
+ no|yes|auto)
+ https_support=$enableval
+ AC_MSG_RESULT($enableval)
+ ;;
+ *)
+ AC_MSG_ERROR(bad value for https, expected yes/no/auto)
+ ;;
+ esac
+ ],
+ [
+ https_support=yes
+ AC_MSG_RESULT($https_support=)
+ ])
+if test x"$https_support" = x"no"; then
+AC_MSG_NOTICE([disabling https support])
+AC_DEFINE(HTS_USEOPENSSL, 0)
+else
+AC_CHECK_LIB(ssl, SSL_library_init,
+ [
+ OPENSSL_LIBS="-lcrypto -lssl"
+ AC_DEFINE(HTS_USEOPENSSL, 1, [Check for OpenSSL])
+ ],
+ [
+ if test x"$https_support" = x"yes"; then
+ AC_MSG_ERROR([not available])
+ else
+ AC_MSG_RESULT([not available])
+ fi
+ ]
+ )
AC_SUBST(OPENSSL_LIBS)
+fi
### Support IPv6
AC_CHECK_LIB(c, getaddrinfo, [V6_FLAG="-DINET6"
-AC_DEFINE(HTS_INET6, 1,[Check for IPv6])], AC_MSG_WARN([*** IPv6 not found IPv6 compatibility disabled]))
+AC_DEFINE(HTS_INET6, 1, [Check for IPv6])], AC_MSG_WARN([*** IPv6 not found IPv6 compatibility disabled]))
AC_SUBST(V6_FLAG)
### Check for LFS
@@ -187,15 +222,31 @@ AC_DEFINE(SETUID, 1,[Check for setuid])], AC_MSG_RESULT([not found]))
### Check for snprintf
AC_FUNC_SNPRINTF()
-## Options
+## Online unit tests
+AC_MSG_CHECKING(whether to enable online unit tests)
AC_ARG_ENABLE([online-unit-tests],
- [AC_HELP_STRING([--enable-online-unit-tests=@<:@yes/no@:>@],
+ [AC_HELP_STRING([--enable-online-unit-tests=@<:@yes/no/auto@:>@],
[Enable online-unit-tests @<:@default=yes@:>@])],
- [online_unit_tests=$enableval],
- [online_unit_tests=maybe])
+ [
+ case "${enableval}" in
+ no|yes|auto)
+ online_unit_tests=$enableval
+ AC_MSG_RESULT($enableval)
+ ;;
+ *)
+ AC_MSG_ERROR(bad value for online-unit-tests, expected yes/no/auto)
+ ;;
+ esac
+ ],
+ [
+ online_unit_tests=no
+ AC_MSG_RESULT(no)
+ ])
AC_SUBST(ONLINE_UNIT_TESTS,$online_unit_tests)
-AC_OUTPUT([ Makefile
+# Final output
+AC_OUTPUT([
+Makefile
src/Makefile
man/Makefile
m4/Makefile
diff --git a/debian/rules b/debian/rules
index 460413e..f58f1c7 100755
--- a/debian/rules
+++ b/debian/rules
@@ -28,8 +28,8 @@ configure-stamp:
dh_testdir
autoreconf -v -i
- # to be replaced by 'dh_auto_configure' only when compat=9
- dh_auto_configure -- $(shell dpkg-buildflags --export=configure)
+ # note: dpkg-buildflags to be removed when compat=9
+ dh_auto_configure -- --enable-online-unit-tests=auto $(shell dpkg-buildflags --export=configure)
touch configure-stamp