summaryrefslogtreecommitdiff
path: root/libextra
diff options
context:
space:
mode:
authorSimon Josefsson <simon@josefsson.org>2008-10-30 15:37:16 +0100
committerSimon Josefsson <simon@josefsson.org>2008-10-30 15:37:16 +0100
commit27e0bf81d07528ada93ceb0c5c8839a7cd83fb7e (patch)
treea0fac7daa58c6332c6eb4f0a9d81ce2b717b6f5a /libextra
parentc26849cfd1875820ae39b73b6a806840bf86fb65 (diff)
downloadgnutls-27e0bf81d07528ada93ceb0c5c8839a7cd83fb7e.tar.gz
More splitting.
Diffstat (limited to 'libextra')
-rw-r--r--libextra/Makefile.am2
-rw-r--r--libextra/configure.ac46
2 files changed, 48 insertions, 0 deletions
diff --git a/libextra/Makefile.am b/libextra/Makefile.am
index fe0aeb4622..80c56287dd 100644
--- a/libextra/Makefile.am
+++ b/libextra/Makefile.am
@@ -20,6 +20,8 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
# 02110-1301, USA.
+ACLOCAL_AMFLAGS = -I gl/m4
+
AM_CPPFLAGS = -I$(srcdir)/gl -I$(top_srcdir)/lgl -I$(top_builddir)/lgl \
-I$(top_srcdir)/lib -I../includes -I$(top_srcdir)/includes \
-I$(top_srcdir)/lib/minitasn1
diff --git a/libextra/configure.ac b/libextra/configure.ac
index a2deb80f4a..8480227dd1 100644
--- a/libextra/configure.ac
+++ b/libextra/configure.ac
@@ -29,6 +29,9 @@ AC_CONFIG_MACRO_DIR([../m4])
AM_INIT_AUTOMAKE([1.10 -Wall -Werror -Wno-override])
AM_CONFIG_HEADER(config.h)
+AC_PROG_CC
+xgl_EARLY
+
AC_LIBTOOL_WIN32_DLL
AC_PROG_LIBTOOL
@@ -65,6 +68,49 @@ AC_MSG_CHECKING([whether to use the included minitasn1])
AC_MSG_RESULT($included_libtasn1)
AM_CONDITIONAL(ENABLE_MINITASN1, test "$included_libtasn1" = "yes")
+dnl CHECK FOR LZO SUPPORT
+dnl
+
+AC_ARG_WITH(lzo,
+ AS_HELP_STRING([--with-lzo], [use experimental LZO compression]),
+ use_lzo=$withval,
+ use_lzo=no)
+AC_MSG_CHECKING([whether to include LZO compression support])
+AC_MSG_RESULT($use_lzo)
+
+LZO_LIBS=
+if test "$use_lzo" = "yes"; then
+ AC_CHECK_LIB(lzo2, lzo1x_1_compress, LZO_LIBS=-llzo2)
+ if test "$LZO_LIBS" = ""; then
+ AC_CHECK_LIB(lzo, lzo1x_1_compress, LZO_LIBS=-llzo, [
+ use_lzo=no
+ AC_MSG_WARN(
+***
+*** Could not find liblzo or liblzo2. Disabling LZO compression.
+)
+ ])
+ fi
+fi
+AC_SUBST(LZO_LIBS)
+
+if test "$use_lzo" = "yes"; then
+ AC_DEFINE(USE_LZO, 1, [whether to use the LZO compression])
+ if test "$LZO_LIBS" = "-llzo"; then
+ AC_CHECK_HEADERS(lzo1x.h)
+ elif test "$LZO_LIBS" = "-llzo2"; then
+ AC_CHECK_HEADERS(lzo/lzo1x.h)
+ fi
+fi
+
+AM_CONDITIONAL(USE_LZO, test "$use_lzo" = "yes")
+
+xgl_INIT
+
+LIBGNUTLS_EXTRA_LIBS="-L${libdir} -lgnutls-extra $LZO_LIBS $LIBGNUTLS_LIBS"
+LIBGNUTLS_EXTRA_CFLAGS="-I${includedir}"
+AC_SUBST(LIBGNUTLS_EXTRA_LIBS)
+AC_SUBST(LIBGNUTLS_EXTRA_CFLAGS)
+
AC_CONFIG_FILES([ \
libextra/Makefile \
libextra/gl/Makefile \