From 61785a6e0b05efe848269751aca1c4ff034e8e1c Mon Sep 17 00:00:00 2001
From: Michael Biebl <biebl@debian.org>
Date: Sat, 16 Aug 2008 02:29:01 +0200
Subject: [PATCH] Fix test-crypto binary

The crypto functions are no longer part of the public API/ABI.
Make sure test-crypto compiles all necessary sources and links against the
crypto libraries.
---
 libnm-util/Makefile.am |   14 +++++++++++++-
 1 files changed, 13 insertions(+), 1 deletions(-)

diff --git a/libnm-util/Makefile.am b/libnm-util/Makefile.am
index a7b577c..42d2fcd 100644
--- a/libnm-util/Makefile.am
+++ b/libnm-util/Makefile.am
@@ -69,10 +69,22 @@ libnm_util_includedir=$(includedir)/NetworkManager
 
 noinst_PROGRAMS = test-crypto
 
-test_crypto_SOURCES = test-crypto.c
+test_crypto_SOURCES = test-crypto.c crypto.c
 test_crypto_CPPFLAGS = $(GLIB_CFLAGS) -D_GNU_SOURCE
 test_crypto_LDADD = $(GLIB_LIBS) libnm-util.la
 
+if WITH_GNUTLS
+test_crypto_SOURCES += crypto_gnutls.c
+test_crypto_CPPFLAGS += $(LIBGCRYPT_CFLAGS) $(GNUTLS_CFLAGS)
+test_crypto_LDADD += $(LIBGCRYPT_LIBS) $(GNUTLS_LIBS)
+endif
+
+if WITH_NSS
+test_crypto_SOURCES += crypto_nss.c
+test_crypto_CPPFLAGS += $(NSS_CFLAGS)
+test_crypto_LDADD += $(NSS_LIBS)
+endif
+
 pkgconfigdir = $(libdir)/pkgconfig
 pkgconfig_DATA = libnm-util.pc
 
-- 
1.5.6.3

