Most importantly preserve
DISABLE_OPENSSL=TRUE AC_SUBST([DISABLE_OPENSSL])
which is widely used internally