summaryrefslogtreecommitdiff
blob: 2ec0858245d9e47ef9667c6d1ec5fa1f0fc02bcf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
diff --git a/Makefile.am b/Makefile.am
--- a/Makefile.am
+++ b/Makefile.am
@@ -8,6 +8,8 @@
 # WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
 # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 
+ACLOCAL_AMFLAGS = -I m4
+
 EXTRA_DIST = autogen.sh README* *.pc.in *.spec.in *.spec *-config.in \
     *-config.1 Doxyfile cmodel.sh BUILDS SUPPORT COPYING* COPYRIGHT \
     CMakeLists.txt ucommon-config.cmake ucommon.pc.cmake cmake-abi.sh \
diff --git a/configure.ac b/configure.ac
--- a/configure.ac
+++ b/configure.ac
@@ -40,6 +40,9 @@
 
 CHECKFLAGS="$CHECKFLAGS"
 
+m4_include([m4/libgcrypt.m4])
+
+
 case "$with_crypto" in
 ssl|openssl)
     ssl="openssl"
@@ -698,6 +701,8 @@
 gnutls|gnu)
     if test ! -z "$GNUTLS_LIBS" ; then
         SECURE_LIBS="$GNUTLS_LIBS"
+	AM_PATH_LIBGCRYPT
+	SECURE_LIBS="$GNUTLS_LIBS $LIBGCRYPT_LIBS"
         SECURE="gnutls"
     fi
     ;;
diff --git a/utils/Makefile.am b/utils/Makefile.am
--- a/utils/Makefile.am
+++ b/utils/Makefile.am
@@ -9,9 +9,9 @@
 # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 
 MAINTAINERCLEANFILES = Makefile.in Makefile
-AM_CXXFLAGS = -I$(top_srcdir)/inc @UCOMMON_FLAGS@
+AM_CXXFLAGS = -I$(top_srcdir)/inc @UCOMMON_FLAGS@ @LIBGCRYPT_CFLAGS@
 AM_CPPFLAGS = -I$(top_srcdir)/inc
-LDADD = ../corelib/libucommon.la @UCOMMON_LIBS@ @UCOMMON_CLINK@
+LDADD = ../corelib/libucommon.la @UCOMMON_LIBS@ @UCOMMON_CLINK@ @LIBGCRYPT_LIBS@
 EXTRA_DIST = *.1
 
 man_MANS = args.1 scrub-files.1 mdsum.1 zerofill.1 car.1 sockaddr.1 \
@@ -30,7 +30,7 @@
 scrub_files_LDFLAGS = @SECURE_LOCAL@
 
 mdsum_SOURCES = mdsum.cpp
-mdsum_LDFLAGS = @SECURE_LOCAL@
+mdsum_LDFLAGS = @SECURE_LOCAL@ @LIBGCRYPT_LIBS@
 
 zerofill_SOURCES = zerofill.cpp
 zerofill_LDFLAGS = @SECURE_LOCAL@