summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2002-06-10 11:35:05 +0000
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2002-06-10 11:35:05 +0000
commita04cb6eb38bf06ba27086117e6a0c713e24f92be (patch)
tree6ad20cf55cc55ef65b6abfabb9777d5370390fd5
parentc54c7030d6ce64eaef4b67e2408c306cfce77a06 (diff)
downloadgnutls-a04cb6eb38bf06ba27086117e6a0c713e24f92be.tar.gz
Added configure option to use the included libasn1.
-rw-r--r--Makefile.am2
-rwxr-xr-xbuildconf1
-rw-r--r--configure.in23
-rw-r--r--lib/Makefile.am2
4 files changed, 25 insertions, 3 deletions
diff --git a/Makefile.am b/Makefile.am
index 4810ccb2ba..e96639b839 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,7 +1,7 @@
## Process this file with automake to produce Makefile.in
EXTRA_DIST = ChangeLog NEWS INSTALL README THANKS COPYING PGPKEYS COPYING.LIB
-SUBDIRS = libasn1 lib libextra src doc tests
+SUBDIRS = $(LIBASN1_DIR) lib libextra src doc tests
ChangeLog:
cvs2cl --utc -U .cvsusers --fsf -t -S --prune
diff --git a/buildconf b/buildconf
index cf5d3ab02d..efc8d22cdc 100755
--- a/buildconf
+++ b/buildconf
@@ -7,4 +7,5 @@ autoheader && \
automake -a -c --gnu || automake -a -c --gnu
autoconf
+
echo "You can now run \"./configure --enable-maintainer-mode\" and \"make\""
diff --git a/configure.in b/configure.in
index a17a080223..405b04d1db 100644
--- a/configure.in
+++ b/configure.in
@@ -300,8 +300,19 @@ else
AC_MSG_RESULT(yes)
fi
+libasn1_enabled=no
+
+AC_CHECK_LIB(asn1, asn1_array2tree,,
+ libasn1_enabled=yes
+ AC_MSG_WARN(
+***
+*** LibASN1 was not found. Will use the included one.))
+AC_ARG_WITH(included-libasn1,
+ [ --with-included-libasn1 Use the included libasn1],
+libasn1_enabled=yes, libasn1_enabled=no)
+
AC_MSG_RESULT([***
@@ -337,7 +348,17 @@ AC_MSG_WARN(***
fi
fi
-AC_CONFIG_SUBDIRS(libasn1)
+
+if test "$libasn1_enabled" = yes; then
+ AC_CONFIG_SUBDIRS(libasn1)
+ LIBASN1_DIR=libasn1
+ AC_SUBST(LIBASN1_DIR)
+ LIBASN1_LINK=../libasn1/lib/libasn1.la
+else
+ LIBASN1_LINK=-lasn1
+fi
+
+AC_SUBST(LIBASN1_LINK)
AC_CONFIG_FILES(lib/gnutls.h.in)
diff --git a/lib/Makefile.am b/lib/Makefile.am
index be413f88fc..fd7aa6d1bc 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -43,7 +43,7 @@ COBJECTS = gnutls_record.c gnutls_compress.c debug.c \
libgnutls_la_SOURCES = $(COBJECTS)
-libgnutls_la_LDFLAGS = ../libasn1/lib/libasn1.la -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
+libgnutls_la_LDFLAGS = $(LIBASN1_LINK) -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
pkix_asn1_tab.c: pkix.asn
-../libasn1/src/asn1c pkix.asn pkix_asn1_tab.c