AM_CPPFLAGS = -I$(srcdir)/ykcore -I$(srcdir)/rfc4634
AM_CFLAGS = $(WARN_CFLAGS)
+AM_CFLAGS += $(libjson_CFLAGS)
+
# The library.
ykpers_includedir=$(includedir)/ykpers-1
rfc4634/sha1.c rfc4634/sha224-256.c rfc4634/sha384-512.c \
rfc4634/sha-private.h
libykpers_1_la_SOURCES += ykpers-1.pc.in libykpers-1.map
-libykpers_1_la_LIBADD = $(LTLIBYUBIKEY) ./ykcore/libykcore.la
+libykpers_1_la_LIBADD = $(LTLIBYUBIKEY) ./ykcore/libykcore.la $(libjson_LIBS)
libykpers_1_la_LDFLAGS = -no-undefined \
-version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
EXTRA_libykpers_1_la_DEPENDENCIES = libykpers-1.map
AM_CONDITIONAL([BACKEND_OSX], test x$with_backend = xosx)
AM_CONDITIONAL([BACKEND_WINDOWS], test x$with_backend = xwindows)
+PKG_CHECK_MODULES([libjson], [json])
+
AC_ARG_WITH([udevrulesdir],
AS_HELP_STRING([--with-udevrulesdir=DIR], [Install udev rules into this directory]),
[], [])