dnl CHECK FOR LZO SUPPORT (whether to use the included one)
dnl
+minilzo_enabled=no
+use_lzo=yes
+AC_ARG_WITH(lzo,
+ [ --without-lzo do not use lzo compression],
+ use_lzo=no,
+ use_lzo=yes
+)
+
+AC_MSG_CHECKING([whether to include lzo compression support])
+AC_MSG_RESULT($use_lzo)
+
+if test x$use_lzo = xyes; then
+
+AC_DEFINE(USE_LZO, 1, [whether to use the lzo compression])
+
if test x$opt_developer_mode = xyes; then
minilzo_enabled=yes
fi
fi
if test x"$minilzo_enabled" = xyes; then
+
AC_DEFINE(USE_MINILZO, 1, [whether to use the included minilzo])
- LZO_OBJECTS="minilzo.lo"
-else
- LZO_LINK=-llzo
fi
-AC_SUBST(LZO_OBJECTS)
-AC_SUBST(LZO_LINK)
+dnl use lzo
+fi
+AM_CONDITIONAL(USE_LZO, test "$use_lzo" = "yes")
+AM_CONDITIONAL(ENABLE_INCLUDED_LZO, test "$minilzo_enabled" = "yes")
AC_MSG_RESULT([***
endif
endif
+if ENABLE_INCLUDED_LZO
+LZO_OBJECTS = minilzo.c
+else
+
+if USE_LZO
+LZO_LIBS = -llzo
+endif
+LZO_OBJECTS =
+endif
+
+
COBJECTS_EXTRA = ext_srp.c \
gnutls_srp.c auth_srp.c auth_srp_passwd.c auth_srp_sb64.c \
gnutls_extra.c auth_srp_rsa.c gnutls_openpgp.c
libgnutls_extra_la_LDFLAGS = $(libgnutls_extra_version_script_cmd) \
-version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
$(LIBOPENCDK_LIBS) $(LZO_LINK)
-libgnutls_extra_la_DEPENDENCIES = $(LZO_OBJECTS)
-libgnutls_extra_la_SOURCES = $(COBJECTS_EXTRA)
+libgnutls_extra_la_SOURCES = $(COBJECTS_EXTRA) $(LZO_OBJECTS)
-libgnutls_extra_la_LIBADD = $(LZO_OBJECTS) $(PGP_LIBS) \
+libgnutls_extra_la_LIBADD = $(LZO_LIBS) $(PGP_LIBS) \
../lib/libgnutls.la
-EXTRA_libgnutls_extra_la_SOURCES = minilzo.c
-
gnutls-extra-api.tex: $(COBJECTS_EXTRA)
@echo "" > gnutls-extra-api.tex
#include <openpgp/gnutls_openpgp.h>
#include <gnutls_extra.h>
#include <gnutls_algorithms.h>
-#include <minilzo.h>
+#ifdef USE_LZO
+# include <minilzo.h>
+#endif
extern gnutls_extension_entry _gnutls_extensions[];
extern const int _gnutls_extensions_size;
/* Functions in gnutls that have not been initialized.
*/
+#ifdef USE_LZO
typedef int (*LZO_FUNC)();
extern LZO_FUNC _gnutls_lzo1x_decompress_safe;
extern LZO_FUNC _gnutls_lzo1x_1_compress;
return GNUTLS_E_MEMORY_ERROR;
}
-
+#endif
extern OPENPGP_KEY_CREATION_TIME_FUNC _E_gnutls_openpgp_get_raw_key_creation_time;
extern OPENPGP_KEY_EXPIRATION_TIME_FUNC _E_gnutls_openpgp_get_raw_key_expiration_time;
/* Initialize the LZO library
*/
+#ifdef USE_LZO
if (lzo_init() != LZO_E_OK) {
return GNUTLS_E_LZO_INIT_FAILED;
}
gnutls_assert();
return ret;
}
+#endif
#ifdef ENABLE_SRP
/* Add the SRP authentication to the list of authentication